diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-05-02 17:35:47 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-05-02 17:35:47 +0000 |
commit | acc4868b78c6fa0c4d2aba6a4155d2a11fb173ee (patch) | |
tree | 8f6c57dfb4ccef301b30cef089387b18a2a213dc | |
parent | 1afb67e31b3e8f952e39e4de4f1abeac3fc84376 (diff) |
Tobias Rundstrom reported a problem they experienced with xmms2 and recent
libcurls, which turned out to be the 25-nov-2006 change which treats HTTP
responses without Content-Length or chunked encoding as without bodies. We
now added the conditional that the above mentioned response is only without
body if the response is HTTP 1.1.
-rw-r--r-- | CHANGES | 6 | ||||
-rw-r--r-- | RELEASE-NOTES | 4 | ||||
-rw-r--r-- | lib/transfer.c | 5 |
3 files changed, 12 insertions, 3 deletions
@@ -7,6 +7,12 @@ Changelog Daniel S (2 May 2007) +- Tobias Rundström reported a problem they experienced with xmms2 and recent + libcurls, which turned out to be the 25-nov-2006 change which treats HTTP + responses without Content-Length or chunked encoding as without bodies. We + now added the conditional that the above mentioned response is only without + body if the response is HTTP 1.1. + - Jeff Pohlmeyer improved the hiperfifo.c example to use the CURLMOPT_TIMERFUNCTION callback option. diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 66726a45e..f349796d0 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -34,6 +34,8 @@ This release includes the following bugfixes: o curl -V / curl_verion*() works even when GnuTLS is used on a system without a good random source o curl_multi_socket() not "noticing" newly added handles + o lack of Content-Length and chunked encoding now requires HTTP 1.1 as well + to be treated as without response body This release includes the following known bugs: @@ -57,6 +59,6 @@ advice from friends like these: Song Ma, Dan Fandrich, Yang Tse, Jay Austin, Robert Iakobashvil, James Housley, Daniel Black, Steve Little, Sonia Subramanian, Peter O'Gorman, - Frank Hempel, Michael Wallner, Jeff Pohlmeyer + Frank Hempel, Michael Wallner, Jeff Pohlmeyer, Tobias Rundström Thanks! (and sorry if I forgot to mention someone) diff --git a/lib/transfer.c b/lib/transfer.c index 760884e9b..d9e37b01b 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -574,8 +574,9 @@ CURLcode Curl_readwrite(struct connectdata *conn, else { k->header = FALSE; /* no more header to parse! */ - if((k->size == -1) && !conn->bits.chunk && !conn->bits.close) - /* When connection is not to get closed, but no + if((k->size == -1) && !conn->bits.chunk && !conn->bits.close && + (k->httpversion >= 11) ) + /* On HTTP 1.1, when connection is not to get closed, but no Content-Length nor Content-Encoding chunked have been received, there is no body in this response. We don't set stop_reading TRUE since that would also prevent necessary |