Changelog
Daniel Stenberg (3 Jul 2008)
+- Phil Blundell provided a fix for libcurl's treatment of unexpected 1xx
+ response codes. Previously libcurl would hang on such occurances. I added
+ test case 1033 to verify.
+
- Introcuding a new timestamp for curl_easy_getinfo():
CURLINFO_APPCONNECT_TIME. This is set with the "application layer"
handshake/connection is completed. Which typically is SSL, TLS or SSH and by
o range requests with --head are now done correctly
o fallback to gettimeofday when monotonic clock is unavailable at run-time
o range numbers could be made to wrongly get output as signed
+ o unexpected 1xx responses hung transfers
This release includes the following known bugs:
Lenny Rachitsky, Axel Tillequin, Arnaud Ebalard, Yang Tse, Dan Fandrich,
Rob Crittenden, Dengminwen, Christopher Palow, Hans-Jurgen May,
Phil Pellouchoud, Eduard Bloch, John Lightsey, Stephen Collyer, Tor Arntsen,
- Rolland Dudemaine
+ Rolland Dudemaine, Phil Blundell
Thanks! (and sorry if I forgot to mention someone)
bool pickproxy = FALSE;
CURLcode code = CURLE_OK;
- if(100 == data->req.httpcode)
+ if(100 <= data->req.httpcode && 199 >= data->req.httpcode)
/* this is a transient response code, ignore */
return CURLE_OK;
k->p++; /* pass the \n byte */
#endif /* CURL_DOES_CONVERSIONS */
- if(100 == k->httpcode) {
+ if(100 <= k->httpcode && 199 >= k->httpcode) {
/*
* We have made a HTTP PUT or POST and this is 1.1-lingo
* that tells us that the server is OK with this and ready
data->req.headerbytecount += (long)headerlen;
data->req.deductheadercount =
- (100 == k->httpcode)?data->req.headerbytecount:0;
+ (100 <= k->httpcode && 199 >= k->httpcode)?data->req.headerbytecount:0;
if(data->state.resume_from &&
(data->set.httpreq==HTTPREQ_GET) &&
test1021 test1022 test1023 test309 test616 test617 test618 test619 \
test620 test621 test622 test623 test624 test625 test626 test627 test554 \
test1024 test1025 test555 test1026 test1027 test1028 test1029 test1030 \
- test556 test1031 test628 test629 test630 test631 test632 test1032
+ test556 test1031 test628 test629 test630 test631 test632 test1032 test1033
filecheck:
@mkdir test-place; \
--- /dev/null
+#
+# This case with an unexpected 1xx response used to cause a "hang" before the fix
+# got 7.19.0
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 102 unexpected huh?!
+
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP GET with 102 response!
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1033
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /1033 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>