aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-05-22 21:09:09 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-05-22 21:09:09 +0000
commit2966ef66616fc641e67c401737a968c60cb68ca6 (patch)
tree57ad0344c0ed8083f0e2a1d70ceaa21c473e0353
parent93c53424c813e1c177b6b35057adeac0f71b86ac (diff)
store httpcode _before_ doing the FAILONERROR check so that getinfo works
afterwards (bug #426442)
-rw-r--r--lib/transfer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 3ee2bb8bd..0374da0da 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -466,6 +466,9 @@ Transfer(struct connectdata *c_conn)
or else we consiser this to be the body right away! */
if (2 == sscanf (p, " HTTP/1.%d %3d", &httpversion,
&httpcode)) {
+ data->progress.httpcode = httpcode;
+ data->progress.httpversion = httpversion;
+
/* 404 -> URL not found! */
if (
( ((data->bits.http_follow_location) &&
@@ -480,8 +483,6 @@ Transfer(struct connectdata *c_conn)
failf (data, "The requested file was not found");
return CURLE_HTTP_NOT_FOUND;
}
- data->progress.httpcode = httpcode;
- data->progress.httpversion = httpversion;
if(httpversion == 0)
/* Default action for HTTP/1.0 must be to close, unless