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 642028 - Do not cache multipart/x-mixed-replace content
Do not cache multipart/x-mixed-replace content
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: HTTP Transport
2.33.x
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2011-02-10 13:48 UTC by Sergio Villar
Modified: 2011-02-16 10:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (924 bytes, patch)
2011-02-10 13:49 UTC, Sergio Villar
reviewed Details | Review

Description Sergio Villar 2011-02-10 13:48:39 UTC
That MIME type is used by servers to implement what it's normally called server push. It's typically used to "stream" video from webcams.

Makes no sense to cache those resources as they always change.
Comment 1 Sergio Villar 2011-02-10 13:49:17 UTC
Created attachment 180578 [details] [review]
Patch
Comment 2 Dan Winship 2011-02-15 20:18:55 UTC
Comment on attachment 180578 [details] [review]
Patch

it really seems like this should be the responsibility of the server to indicate the resource's non-cacheability... but anyway:

>+	content_type = soup_message_headers_get_content_type (msg->response_headers, NULL);
>+	if (content_type && !g_ascii_strncasecmp(content_type, "multipart/x-mixed-replace", 25))

The docs aren't totally clear, but the return value of soup_message_headers_get_content_type() is just the MIME type part, so you don't need strncasecmp. Also, you need a space between the function name and the open paren.

OK to commit with those fixes.
Comment 3 Sergio Villar 2011-02-16 10:33:34 UTC
Committed 611655c62596e9d925ee6b47a00bd8812a84b77b