Jeff King [off-list ref] writes:
I can't think of a synchronization point we could use here. We're
waiting on curl to have passed the bytes to fwrite() and for it to have
actually synced to disk. We either have to poll or modify http.c to
write "yes, we got some bytes!" to a fifo. Both are pretty gross.
I wonder if we could just drop that "test -s" entirely. We'd _usually_
see some bytes written before the second request starts. But it's OK if
we don't. It just means the test is working in the reverse order (the
second request may write its bytes first, and then the first one is the
one "overwriting" it). I.e., the two are symmetric from our perspective.
Yeah, that sounds quite sensible.
Thanks for digging.