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 729707 - souphttpsrc: Add custom sticky event to contain the HTTP request and response headers
souphttpsrc: Add custom sticky event to contain the HTTP request and response...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal enhancement
: 1.3.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-07 12:10 UTC by Sebastian Dröge (slomo)
Modified: 2014-05-28 07:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-souphttpsrc-Add-custom-sticky-event-to-contain-the-H.patch (4.15 KB, patch)
2014-05-07 12:10 UTC, Sebastian Dröge (slomo)
none Details | Review
0001-souphttpsrc-Add-custom-sticky-event-to-contain-the-H.patch (4.37 KB, patch)
2014-05-23 08:53 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2014-05-07 12:10:44 UTC
Created attachment 276064 [details] [review]
0001-souphttpsrc-Add-custom-sticky-event-to-contain-the-H.patch

See attached patch. This might be useful for downstream elements to know more about the data that comes next... like the cookies related to it, cache parameters, etc.
Comment 1 Sebastian Dröge (slomo) 2014-05-07 12:11:36 UTC
Open questions:
- Are the names ok?
- Should the method (GET) and the URI be included too? What about the HTTP version?
Comment 2 Olivier Crête 2014-05-07 17:45:47 UTC
What's the use-case here ?
For the URI, we have nothing else? It may make sense for other sources, like RTSP, to include that kind of information too.
Comment 3 Sebastian Dröge (slomo) 2014-05-07 17:55:54 UTC
For the URI we have the URI query already, yes.


The use case here is rather theoretical... downstream elements might want to know about various headers, e.g. to extract cookies for later use or to know if they're allowed to cache the buffers (Cache-Control header), or ... :) I don't have any use for that right now, just seems useful to have.
Comment 4 GstBlub 2014-05-22 16:36:59 UTC
I think it would be helpful to include the uri in the structure.

Also, shouldn't you be calling g_value_get_string() rather than g_value_dup_string()?  Otherwise, old_value would leak, wouldn't it?
Comment 5 Sebastian Dröge (slomo) 2014-05-22 17:48:11 UTC
I think you're right, will update the patch tomorrow :) And also include the URL, it makes sense definitely, even if you could get it from an URI query too... but that would be racy.
Comment 6 Sebastian Dröge (slomo) 2014-05-23 08:53:25 UTC
Created attachment 277035 [details] [review]
0001-souphttpsrc-Add-custom-sticky-event-to-contain-the-H.patch
Comment 7 Sebastian Dröge (slomo) 2014-05-26 07:21:11 UTC
GstBlub, is this patch useful for your use case now? Are you still working on the cookie handling? :)
Comment 8 GstBlub 2014-05-27 17:49:46 UTC
Yes, I actually have cookies working with the help of this updated patch.  I borrowed a lot from libsoup (but modified to make it more simplistic) and in some areas much more rudimentary and certainly not as feature rich, but it works.  Still needs polishing, though.
Comment 9 Sebastian Dröge (slomo) 2014-05-27 20:18:02 UTC
Good to hear :) If you want some review or comments of your changes feel free to put them into a bug already or ask me via mail. Would be great if we could integrate that before 1.4 already :)
Comment 10 Sebastian Dröge (slomo) 2014-05-28 07:21:01 UTC
commit edc7d9027ec83bb0a028d807644ddd3e896086a9
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Wed May 7 14:09:06 2014 +0200

    souphttpsrc: Add custom sticky event to contain the HTTP request and response headers
    
    This can be useful to e.g. get cookie information downstream.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=729707