aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/transfer.c5
-rw-r--r--lib/urldata.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 3a18c7bdd..27fe79074 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -1526,11 +1526,14 @@ CURLcode Curl_pretransfer(struct Curl_easy *data)
if(data->set.httpreq == HTTPREQ_PUT)
data->state.infilesize = data->set.filesize;
- else {
+ else if((data->set.httpreq != HTTPREQ_GET) &&
+ (data->set.httpreq != HTTPREQ_HEAD)) {
data->state.infilesize = data->set.postfieldsize;
if(data->set.postfields && (data->state.infilesize == -1))
data->state.infilesize = (curl_off_t)strlen(data->set.postfields);
}
+ else
+ data->state.infilesize = 0;
/* If there is a list of cookie files to read, do it now! */
if(data->change.cookielist)
diff --git a/lib/urldata.h b/lib/urldata.h
index ff3cc9a65..e137569ac 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -1150,7 +1150,6 @@ typedef enum {
HTTPREQ_PUT,
HTTPREQ_HEAD,
HTTPREQ_OPTIONS,
- HTTPREQ_CUSTOM,
HTTPREQ_LAST /* last in list */
} Curl_HttpReq;