mirror of
https://github.com/curl/curl.git
synced 2026-08-25 10:43:34 +03:00
fixed the 304 response-with-content-length problem reported by Cory Nelson
This commit is contained in:
parent
a9b7c3531c
commit
fb3c85ab2f
4 changed files with 51 additions and 2 deletions
|
|
@ -697,6 +697,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
|||
* fields. */
|
||||
conn->size=0;
|
||||
conn->maxdownload=0;
|
||||
k->ignorecl = TRUE; /* ignore Content-Length headers */
|
||||
break;
|
||||
default:
|
||||
/* nothing */
|
||||
|
|
@ -713,7 +714,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
|||
the header completely if we get a 416 response as then we're
|
||||
resuming a document that we don't get, and this header contains
|
||||
info about the true size of the document we didn't get now. */
|
||||
if ((k->httpcode != 416) &&
|
||||
if (!k->ignorecl &&
|
||||
checkprefix("Content-Length:", k->p)) {
|
||||
contentlength = curlx_strtoofft(k->p+15, NULL, 10);
|
||||
if (data->set.max_filesize &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue