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 601640 - soup_multipart_new_from_message() doesn't work properly with binary message body
soup_multipart_new_from_message() doesn't work properly with binary message body
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: HTTP Transport
2.28.x
Other Linux
: Normal critical
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2009-11-12 05:11 UTC by Sergey I. Sharybin
Modified: 2009-11-21 15:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Source code to help with error representation (1.18 KB, application/octet-stream)
2009-11-12 05:11 UTC, Sergey I. Sharybin
Details

Description Sergey I. Sharybin 2009-11-12 05:11:50 UTC
Created attachment 147535 [details]
Source code to help with error representation 

Hi,

I'm using LibSoup as HTTP-server for web access to my application. I need to
POST files to this server by multipart/form-data - encoded FORM. In handler of
this POST request I'm using function soup_multipart_new_from_message() to get
access to each part of body.

When I'm posting a text file all is OK. But if I'm posting binary file
(picture, executable file..) soup_multipart_new_from_message() returns NULL.

I've attached small HTTP-server which could help to represent this error. Just
connect to this server from web-browser and try to submit text and binary
files.

Thanks
Comment 1 Dan Winship 2009-11-17 15:56:58 UTC
oops, looks like we use strstr() to find the multipart boundary string, so it will fail if there's a '\0' byte
Comment 2 Dan Winship 2009-11-21 15:30:50 UTC
fixed in git. will be in libsoup 2.28.2 in a few weeks. thanks for the
bug report.