What version of wvhttpstream are you looking at? In my current
master, the above code doesn't really exist (even the whitespace is
different). In fact, I think commit
0c3ca0ca2693e709d6f9c8711cb29bd15f95f15b might already solve your
problem.
Hope this helps,
Avery
Well, the "reason" is that it might be gigantic and it might
theoretically be coming from some network stream, so reading it all at
once would be blocking. But it didn't work at all if it didn't read
the whole thing at once (as you observed) and I don't know of any
existing apps that need to stream from one http stream to another, for
example, and we had to read it all into RAM anyway to get the
Content-Length, so eventually we just said screw it and tried to
eliminate the actually pressing class of bugs.
(This was part of the big batch of fixes for EQL Data, which uploads a
lot of stuff and uses WvHttpStream extensively. The latest version
should be a lot more stable in weird edge cases.)
Have fun,
Avery
Yes, I think that commit will indeed fix my problem. I assumed there was a
reason we *weren't* reading the putstream in its entirety on the first go.
If there isn't, then so much the better.
Have fun,
-Dave