Loading lib/http.c +13 −6 Original line number Diff line number Diff line Loading @@ -815,8 +815,6 @@ CURLcode Curl_http(struct connectdata *conn) } if(HTTPREQ_POST_FORM == data->set.httpreq) { char contentType[256]; int linelength=0; if(Curl_FormInit(&http->form, http->sendit)) { failf(data, "Internal HTTP POST error!"); return CURLE_HTTP_POST_ERROR; Loading @@ -840,10 +838,19 @@ CURLcode Curl_http(struct connectdata *conn) add_bufferf(req_buffer, "Expect: 100-continue\r\n"); data->set.expect100header = TRUE; } if(!checkheaders(data, "Content-Type:")) { /* Get Content-Type: line from Curl_FormReadOneLine, which happens to always be the first line. We can know this for sure since we always build the formpost linked list the same way! */ we always build the formpost linked list the same way! The Content-Type header line also contains the MIME boundary string etc why disabling this header is likely to not make things work, but we support it anyway. */ char contentType[256]; int linelength=0; linelength = Curl_FormReadOneLine (contentType, sizeof(contentType), 1, Loading @@ -853,10 +860,10 @@ CURLcode Curl_http(struct connectdata *conn) return CURLE_HTTP_POST_ERROR; } add_buffer(req_buffer, contentType, linelength); } /* make the request end in a true CRLF */ add_buffer(req_buffer, "\r\n", 2); } /* set upload size to the progress meter */ Curl_pgrsSetUploadSize(data, http->postsize); Loading Loading
lib/http.c +13 −6 Original line number Diff line number Diff line Loading @@ -815,8 +815,6 @@ CURLcode Curl_http(struct connectdata *conn) } if(HTTPREQ_POST_FORM == data->set.httpreq) { char contentType[256]; int linelength=0; if(Curl_FormInit(&http->form, http->sendit)) { failf(data, "Internal HTTP POST error!"); return CURLE_HTTP_POST_ERROR; Loading @@ -840,10 +838,19 @@ CURLcode Curl_http(struct connectdata *conn) add_bufferf(req_buffer, "Expect: 100-continue\r\n"); data->set.expect100header = TRUE; } if(!checkheaders(data, "Content-Type:")) { /* Get Content-Type: line from Curl_FormReadOneLine, which happens to always be the first line. We can know this for sure since we always build the formpost linked list the same way! */ we always build the formpost linked list the same way! The Content-Type header line also contains the MIME boundary string etc why disabling this header is likely to not make things work, but we support it anyway. */ char contentType[256]; int linelength=0; linelength = Curl_FormReadOneLine (contentType, sizeof(contentType), 1, Loading @@ -853,10 +860,10 @@ CURLcode Curl_http(struct connectdata *conn) return CURLE_HTTP_POST_ERROR; } add_buffer(req_buffer, contentType, linelength); } /* make the request end in a true CRLF */ add_buffer(req_buffer, "\r\n", 2); } /* set upload size to the progress meter */ Curl_pgrsSetUploadSize(data, http->postsize); Loading