soup-multipart: don't use Content-Transfer-Encoding in multipart/form-data
authorDan Winship <danw@gnome.org>
Tue, 6 Apr 2010 16:42:33 +0000 (12:42 -0400)
committerDan Winship <danw@gnome.org>
Fri, 9 Apr 2010 23:51:33 +0000 (19:51 -0400)
The HTML 4.01 spec says you have to, but apparently no one else does,
and it confuses some servers.

https://bugzilla.gnome.org/show_bug.cgi?id=614198

libsoup/soup-multipart.c

index 9223f1d..45deed6 100644 (file)
@@ -385,20 +385,6 @@ soup_multipart_append_form_file (SoupMultipart *multipart,
                                             content_type);
        }
 
-       /* The HTML spec says we need to set Content-Transfer-Encoding
-        * if the data is not 7bit. It probably doesn't actually
-        * matter...
-        */
-       if (content_type && strncmp (content_type, "text/", 5) != 0) {
-               soup_message_headers_append (headers,
-                                            "Content-Transfer-Encoding",
-                                            "binary");
-       } else {
-               soup_message_headers_append (headers,
-                                            "Content-Transfer-Encoding",
-                                            "8bit");
-       }
-
        g_ptr_array_add (multipart->headers, headers);
        g_ptr_array_add (multipart->bodies, soup_buffer_copy (body));
 }