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 786049 - curlhttpsrc: http-version property is not present if curl does not have HTTP2 feature present
curlhttpsrc: http-version property is not present if curl does not have HTTP2...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-09 13:39 UTC by A Ashley
Modified: 2017-08-09 15:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
curlhttpsrc: set http-version default if curl does not have HTTP2 feature present (1.48 KB, patch)
2017-08-09 13:47 UTC, A Ashley
none Details | Review
curlhttpsrc: set http-version default if curl does not have HTTP2 feature pr esent (2.78 KB, patch)
2017-08-09 14:18 UTC, A Ashley
committed Details | Review

Description A Ashley 2017-08-09 13:39:50 UTC
The gst_curl_http_src_class_init() function in the curlhttpsrc element tries to work out the maximum supported HTTP version when adding the "http-version" property.

However, if the version of the curl library is recent enough to allow support for HTTP2 (i.e. CURL_VERSION_HTTP2 is defined) but does not actually have that feature enabled, the call to g_object_class_install_property() uses an invalid default value when trying to add the "http-version" property. It tries to use minimum=1.0, maximum=1.1, default=2.0. This causes a validation check to fail and for the property to not be added to the element.
Comment 1 A Ashley 2017-08-09 13:47:27 UTC
Created attachment 357265 [details] [review]
curlhttpsrc: set http-version default if curl does not have HTTP2 feature present
Comment 2 Sebastian Dröge (slomo) 2017-08-09 13:50:39 UTC
Comment on attachment 357265 [details] [review]
curlhttpsrc: set http-version default if curl does not have HTTP2 feature present

Thanks! Makes sense, but does not apply to latest GIT master :)
Comment 3 A Ashley 2017-08-09 14:16:32 UTC
Rats, didn't see bug785878. This code has already been changed on master.

There is now a similar bug in that the default is still wrong, but it no longer causes the property to fail to be created.
Comment 4 A Ashley 2017-08-09 14:18:01 UTC
Created attachment 357271 [details] [review]
curlhttpsrc: set http-version default if curl does not have HTTP2 feature pr esent

Use HTTP1.1 as the default if HTTP2 feature has not been enabled.
Comment 5 Sebastian Dröge (slomo) 2017-08-09 14:59:54 UTC
slomo@lotus ~/P/g/h/g/e/curl (master)> git log
commit 048d70357796e3e9ec11a8f8d91d85a43c637bde (HEAD -> master)
Author: Alex Ashley <bugzilla@ashley-family.net>
Date:   Wed Aug 9 15:10:56 2017 +0100

    curlhttpsrc: set http-version default if curl does not have HTTP2 feature present
    
    If the version of the curl library is recent enough to allow support
    for HTTP2 (i.e. CURL_VERSION_HTTP2 is defined) but does not actually
    have that feature enabled, the call to
    g_object_class_install_property() uses an incorrect default value for
    the "http-version" property. The default should be 1.1 if HTTP2 is
    not supported by libcurl or if not enabled by libcurl.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786049