GNOME Bugzilla – Bug 614176
multipart/form-data with quoted boundary parameter value causes problems in communication with some servers
Last modified: 2010-04-09 23:53:23 UTC
When using the multipart/form-data, libsoup uses quotes around the boundary parameter value. This causes responses with status-code 404 from some servers I try to upload files to. According to specifications, this is not invalid, but RFC 2616 section 19.2 has the following note: <cite> 2) Although RFC 2046 [40] permits the boundary string to be quoted, some existing implementations handle a quoted boundary string incorrectly. </cite> As the boundary string used by libsoup is a hexadecimal string, there are no reason to quote the boundary string. This is easily fixed in soup-multipart.c by changing a single line in function soup_multipart_to_message () From: content_type = g_strdup_printf ("%s; boundary=\"%s\"", To: content_type = g_strdup_printf ("%s; boundary=%s",
fixed in master, will go into 2.30.1