transfer: make HTTP without headers count correct body size

This is what "HTTP/0.9" basically looks like.

Reported on IRC

Closes #2382
This commit is contained in:
Daniel Stenberg 2018-03-15 00:27:20 +01:00
parent 634f72fed4
commit a9a7b606c2
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 60 additions and 5 deletions

View file

@ -717,7 +717,7 @@ static CURLcode readwrite_data(struct Curl_easy *data,
#endif /* CURL_DISABLE_HTTP */
/* Account for body content stored in the header buffer */
if(k->badheader && !k->ignorebody) {
if((k->badheader == HEADER_PARTHEADER) && !k->ignorebody) {
DEBUGF(infof(data, "Increasing bytecount by %zu from hbuflen\n",
k->hbuflen));
k->bytecount += k->hbuflen;