GNOME Bugzilla – Bug 786049
curlhttpsrc: http-version property is not present if curl does not have HTTP2 feature present
Last modified: 2017-08-09 15:01:49 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.
Created attachment 357265 [details] [review] curlhttpsrc: set http-version default if curl does not have HTTP2 feature present
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 :)
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.
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.
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