aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-08-07 14:55:19 +0200
committerDaniel Stenberg <daniel@haxx.se>2012-08-07 14:55:19 +0200
commitf0d611df9e5f606cd402a2de84f1cdd69ebc5864 (patch)
treefa019577acda0c1ce2bc56691e84f1d7accd6330
parent013d043d226913b14ff2c2034346832994bcab11 (diff)
retry request: only access the HTTP data if in fact HTTP
When figuring out if the data stream needs to be rewound when the request is to be resent, we must not access the HTTP struct unless the protocol used is indeed HTTP... Bug: http://curl.haxx.se/bug/view.cgi?id=3544688
-rw-r--r--lib/transfer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index d6fc93445..73456ec3e 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -2060,7 +2060,9 @@ CURLcode Curl_retry_request(struct connectdata *conn,
error just because nothing has been
transferred! */
- if(data->state.proto.http->writebytecount)
+
+ if((conn->handler->protocol&CURLPROTO_HTTP) &&
+ data->state.proto.http->writebytecount)
return Curl_readrewind(conn);
}
return CURLE_OK;