[Bug 693911] souphttpsrc: rewrite using new session/request API

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat May 14 15:50:22 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=693911

--- Comment #8 from Thiago Sousa Santos <thiagossantos at gmail.com> ---
(In reply to Dan Winship from comment #6)
> Awesome... skimming the diff I see a few possible problems:
> 
> >-          soup_session_async_new_with_options (SOUP_SESSION_ASYNC_CONTEXT,
> >+          soup_session_new_with_options (SOUP_SESSION_USER_AGENT,
> 
> Be sure to read
> https://developer.gnome.org/libsoup/stable/libsoup-session-porting.html. In
> particular, you don't need to add a SOUP_TYPE_PROXY_RESOLVER_DEFAULT feature
> any more, since that's the default behavior (if you don't set
> SOUP_SESSION_PROXY_URI), and you don't need to add a
> SOUP_TYPE_CONTENT_DECODER (though you still want to remove the
> automatically-added one if !src->compress)

Removed the proxy entry but kept the compress as it was already being explicit
about the choice, even though !compress was the default before.

> 
> (OK, neither of those are actually *problems*, they're just places where the
> code is doing stuff it doesn't have to do any more.)
> 
> >+  src->input_stream =
> >+      soup_session_send (src->session, src->msg, src->cancellable, NULL);
> >+  gst_soup_http_src_got_headers (src, src->msg);
> 
> That won't do the right thing if the message fails or is cancelled before
> reading the headers. Note that in the old code, "got-headers" wouldn't be
> emitted in that case and it would go right to "finished". So some of the
> error checking code that used to be in gst_soup_http_src_finished_cb() needs
> to happen before you call gst_soup_http_src_got_headers().

Added some code to handle the cancellation, but what exactly happens when the
message fails before the headers? I'm guessing no GInputStream is created
there. So we should only parse the headers if we got a GInputStream?

Will also look at the other changes in that porting document.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list