--- http.c-7.15.4	Sat May  6 00:14:40 2006
+++ http.c-result-patch	Wed Jul 26 15:46:04 2006
@@ -1556,6 +1556,10 @@
               header as that will produce *two* in the same request! */
            curl_strnequal("Host:", headers->data, 5))
           ;
+        else if(conn->data->set.httpreq == HTTPREQ_POST_FORM &&
+           /* the version of this header extended by formdata.c is sent later */
+           curl_strnequal("Content-Type:", headers->data, strlen("Content-Type:")))
+          ;
         else {
 
           result = add_bufferf(req_buffer, "%s\r\n", headers->data);
@@ -1811,6 +1815,7 @@
     /* we must build the whole darned post sequence first, so that we have
        a size of the whole shebang before we start to send it */
      result = Curl_getFormData(&http->sendit, data->set.httppost,
+                               checkheaders(data, "Content-Type:"),
                                &http->postsize);
      if(CURLE_OK != result) {
        /* Curl_getFormData() doesn't use failf() */
@@ -2134,12 +2139,9 @@
       if(result)
         return result;
 
-      if(!checkheaders(data, "Content-Type:")) {
-        /* Get Content-Type: line from Curl_formpostheader.
+      {
 
-           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 disabling it anyway.
+        /* Get Content-Type: line from Curl_formpostheader.
         */
         char *contentType;
         size_t linelength=0;
@@ -2149,6 +2151,7 @@
           failf(data, "Could not get Content-Type header line!");
           return CURLE_HTTP_POST_ERROR;
         }
+
         result = add_buffer(req_buffer, contentType, linelength);
         if(result)
           return result;
