After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 614176 - multipart/form-data with quoted boundary parameter value causes problems in communication with some servers
multipart/form-data with quoted boundary parameter value causes problems in c...
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: HTTP Transport
unspecified
Other All
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2010-03-28 14:05 UTC by Egon Andersen
Modified: 2010-04-09 23:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Egon Andersen 2010-03-28 14:05:47 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",
Comment 1 Dan Winship 2010-04-09 23:53:23 UTC
fixed in master, will go into 2.30.1