Browse files

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...

  • Loading branch information...
1 parent 013d043 commit f0d611df9e5f606cd402a2de84f1cdd69ebc5864 @bagder bagder committed Aug 7, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 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;

0 comments on commit f0d611d

Please sign in to comment.