better deal with HTTP(S) servers that respond with no headers at all, test

case 306 added to verify that we do right
This commit is contained in:
Daniel Stenberg
2002-09-13 12:40:36 +00:00
parent 22cf05519a
commit c19844a0a3
3 changed files with 38 additions and 16 deletions

View File

@@ -965,7 +965,8 @@ CURLcode Curl_http(struct connectdata *conn)
failf(data, "Failed sending HTTP POST request");
else
result =
Curl_Transfer(conn, conn->firstsocket, -1, TRUE, bytecount,
Curl_Transfer(conn, conn->firstsocket, -1, TRUE,
&http->readbytecount,
data->set.postfields?-1:conn->firstsocket,
data->set.postfields?NULL:&http->writebytecount);
break;
@@ -981,7 +982,8 @@ CURLcode Curl_http(struct connectdata *conn)
failf(data, "Failed sending HTTP request");
else
/* HTTP GET/HEAD download: */
result = Curl_Transfer(conn, conn->firstsocket, -1, TRUE, bytecount,
result = Curl_Transfer(conn, conn->firstsocket, -1, TRUE,
&http->readbytecount,
-1, NULL); /* nothing to upload */
}
if(result)