diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-12-10 14:45:35 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-12-10 14:45:35 +0000 |
commit | c0c885a1f37c5cbced25cb9616c4f868151fd740 (patch) | |
tree | 3bf626f29c87a8918d91dbd7686c5a1d2bd625ae | |
parent | a7488672bf228d1e9ce7ab8e94303864f3c6fab0 (diff) |
don't try the rewind if no http struct is allocated yet
-rw-r--r-- | lib/http.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/http.c b/lib/http.c index 8303c5301..d984eddc1 100644 --- a/lib/http.c +++ b/lib/http.c @@ -219,9 +219,16 @@ static CURLcode perhapsrewind(struct connectdata *conn) { struct HTTP *http = conn->proto.http; struct SessionHandle *data = conn->data; - curl_off_t bytessent = http->writebytecount; + curl_off_t bytessent; curl_off_t expectsend = -1; /* default is unknown */ + if(!http) + /* If this is still NULL, we have not reach very far and we can + safely skip this rewinding stuff */ + return CURLE_OK; + + bytessent = http->writebytecount; + /* figure out how much data we are expected to send */ switch(data->set.httpreq) { case HTTPREQ_POST: |