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 674732 - Make SoupCache work again (after giobased landing)
Make SoupCache work again (after giobased landing)
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: Misc
unspecified
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2012-04-24 16:49 UTC by Sergio Villar
Modified: 2012-04-25 06:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
soup-client-input-stream: emit SoupMessage::got-chunk (2.05 KB, patch)
2012-04-24 16:53 UTC, Sergio Villar
needs-work Details | Review
soup-client-input-stream: emit SoupMessage::got-chunk (2.06 KB, patch)
2012-04-24 17:29 UTC, Sergio Villar
accepted-commit_now Details | Review

Description Sergio Villar 2012-04-24 16:49:40 UTC
After merging the giobased branch SoupMessage's no longer emit the "got-chunk" callback. That was the reason why SoupCache stopped to work.

The current plans are that the cache would get stuck as a another filter into the place that creates the body stream (currently soup-message-io:setup_body_istream()).

In the meantime, Dan suggested to make SoupClientInputStream emit the lost signal and that way the SoupCache will automagically work as it used to be.
Comment 1 Sergio Villar 2012-04-24 16:53:38 UTC
Created attachment 212718 [details] [review]
soup-client-input-stream: emit SoupMessage::got-chunk

SoupClientInputStream will emit the got-chunk signal whenever data is read
from the stream. With that hack we keep the SoupCache working while it is
not proprely migrated to the new gio-based architecture.
Comment 2 Dan Winship 2012-04-24 17:10:39 UTC
Comment on attachment 212718 [details] [review]
soup-client-input-stream: emit SoupMessage::got-chunk

>+	SoupBuffer *buffer = soup_buffer_new (SOUP_MEMORY_TEMPORARY, data, nread);
>+	/* soup_message_got_chunk (stream->priv->msg, buffer); */
>+	soup_buffer_free (buffer);

um... doesn't seem like it will help much with the line commented out? :)

>+	if (nread > 0)
>+		soup_client_input_stream_emit_got_chunk (SOUP_CLIENT_INPUT_STREAM (stream),
>+							 buffer, nread);
>+

{}s around the if body since it's multiple lines, please
Comment 3 Sergio Villar 2012-04-24 17:29:42 UTC
Created attachment 212722 [details] [review]
soup-client-input-stream: emit SoupMessage::got-chunk

SoupClientInputStream will emit the got-chunk signal whenever data is read
from the stream. With that hack we keep the SoupCache working while it is
not proprely migrated to the new gio-based architecture.
Comment 4 Sergio Villar 2012-04-24 17:30:55 UTC
Sorry for the previous patch :) I was in the middle of something else when I uploaded it
Comment 5 Sergio Villar 2012-04-25 06:59:30 UTC
Committed 8a8d5afcc65f6ca9afec99ff54348f8babc59f33