mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 07:39:50 -04:00
store httpcode _before_ doing the FAILONERROR check so that getinfo works
afterwards (bug #426442)
This commit is contained in:
parent
93c53424c8
commit
2966ef6661
@ -466,6 +466,9 @@ Transfer(struct connectdata *c_conn)
|
|||||||
or else we consiser this to be the body right away! */
|
or else we consiser this to be the body right away! */
|
||||||
if (2 == sscanf (p, " HTTP/1.%d %3d", &httpversion,
|
if (2 == sscanf (p, " HTTP/1.%d %3d", &httpversion,
|
||||||
&httpcode)) {
|
&httpcode)) {
|
||||||
|
data->progress.httpcode = httpcode;
|
||||||
|
data->progress.httpversion = httpversion;
|
||||||
|
|
||||||
/* 404 -> URL not found! */
|
/* 404 -> URL not found! */
|
||||||
if (
|
if (
|
||||||
( ((data->bits.http_follow_location) &&
|
( ((data->bits.http_follow_location) &&
|
||||||
@ -480,8 +483,6 @@ Transfer(struct connectdata *c_conn)
|
|||||||
failf (data, "The requested file was not found");
|
failf (data, "The requested file was not found");
|
||||||
return CURLE_HTTP_NOT_FOUND;
|
return CURLE_HTTP_NOT_FOUND;
|
||||||
}
|
}
|
||||||
data->progress.httpcode = httpcode;
|
|
||||||
data->progress.httpversion = httpversion;
|
|
||||||
|
|
||||||
if(httpversion == 0)
|
if(httpversion == 0)
|
||||||
/* Default action for HTTP/1.0 must be to close, unless
|
/* Default action for HTTP/1.0 must be to close, unless
|
||||||
|
Loading…
x
Reference in New Issue
Block a user