Loading lib/http.c +34 −36 Original line number Diff line number Diff line Loading @@ -209,7 +209,7 @@ CURLcode http(struct connectdata *conn) { struct UrlData *data=conn->data; char *buf = data->buffer; /* this is a short cut to the buffer */ CURLcode result; CURLcode result=CURLE_OK; struct HTTP *http; struct Cookie *co=NULL; /* no cookies from start */ char *ppath = conn->ppath; /* three previous function arguments */ Loading Loading @@ -370,18 +370,7 @@ CURLcode http(struct connectdata *conn) headers = headers->next; } if(data->bits.http_post || data->bits.http_formpost) { if(data->bits.http_post) { /* this is the simple x-www-form-urlencoded style */ sendf(data->firstsocket, data, "Content-Length: %d\015\012" "Content-Type: application/x-www-form-urlencoded\r\n\r\n" "%s\015\012", strlen(data->postfields), data->postfields ); } else { if(data->bits.http_formpost) { if(FormInit(&http->form, http->sendit)) { failf(data, "Internal HTTP POST error!\n"); return CURLE_HTTP_POST_ERROR; Loading Loading @@ -411,7 +400,6 @@ CURLcode http(struct connectdata *conn) return result; } } } else if(data->bits.http_put) { /* Let's PUT the data to the server! */ Loading @@ -435,6 +423,16 @@ CURLcode http(struct connectdata *conn) } else { if(data->bits.http_post) { /* this is the simple x-www-form-urlencoded style */ sendf(data->firstsocket, data, "Content-Length: %d\015\012" "Content-Type: application/x-www-form-urlencoded\r\n\r\n" "%s\r\n", strlen(data->postfields), data->postfields ); } else sendf(data->firstsocket, data, "\r\n"); /* HTTP GET/HEAD download: */ Loading Loading
lib/http.c +34 −36 Original line number Diff line number Diff line Loading @@ -209,7 +209,7 @@ CURLcode http(struct connectdata *conn) { struct UrlData *data=conn->data; char *buf = data->buffer; /* this is a short cut to the buffer */ CURLcode result; CURLcode result=CURLE_OK; struct HTTP *http; struct Cookie *co=NULL; /* no cookies from start */ char *ppath = conn->ppath; /* three previous function arguments */ Loading Loading @@ -370,18 +370,7 @@ CURLcode http(struct connectdata *conn) headers = headers->next; } if(data->bits.http_post || data->bits.http_formpost) { if(data->bits.http_post) { /* this is the simple x-www-form-urlencoded style */ sendf(data->firstsocket, data, "Content-Length: %d\015\012" "Content-Type: application/x-www-form-urlencoded\r\n\r\n" "%s\015\012", strlen(data->postfields), data->postfields ); } else { if(data->bits.http_formpost) { if(FormInit(&http->form, http->sendit)) { failf(data, "Internal HTTP POST error!\n"); return CURLE_HTTP_POST_ERROR; Loading Loading @@ -411,7 +400,6 @@ CURLcode http(struct connectdata *conn) return result; } } } else if(data->bits.http_put) { /* Let's PUT the data to the server! */ Loading @@ -435,6 +423,16 @@ CURLcode http(struct connectdata *conn) } else { if(data->bits.http_post) { /* this is the simple x-www-form-urlencoded style */ sendf(data->firstsocket, data, "Content-Length: %d\015\012" "Content-Type: application/x-www-form-urlencoded\r\n\r\n" "%s\r\n", strlen(data->postfields), data->postfields ); } else sendf(data->firstsocket, data, "\r\n"); /* HTTP GET/HEAD download: */ Loading