GNOME Bugzilla – Bug 674732
Make SoupCache work again (after giobased landing)
Last modified: 2012-04-25 06:59:30 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.
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 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
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.
Sorry for the previous patch :) I was in the middle of something else when I uploaded it
Committed 8a8d5afcc65f6ca9afec99ff54348f8babc59f33