[Bug 785878] curlhttpsrc: critical warning in class_init
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Aug 7 14:55:26 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=785878
--- Comment #9 from Sam Hurst <samuelh at rd.bbc.co.uk> ---
Just tested this on my side with different versions of libcurl as well as
against http/1.1 and h2/h2c servers and Philippe's patch works in all cases.
> Just make the HTTP 2 part compile-time in the enum with an #ifdef, and
> for runtime fall-back to HTTP 1.1 if 2 is selected but not supported :)
If libcurl doesn't support the HTTP version specified, it will fall back to
HTTP/1.1 as a default. However, I note that because the libcurl features check
has been removed, we get a slightly clunky WARN message in ::_create() when
libcurl is >=7.33.0 but not built against nghttp2.
Might be worth a check to see if setting CURL_HTTP_VERSION_2_0 failed due to
lack of HTTP/2 support or some bigger underlying libcurl failure (it is
possible to build curl without http support...), e.g.
@@ -1008,8 +1003,15 @@ gst_curl_http_src_create_easy_handle (GstCurlHttpSrc *
s)
#ifdef CURL_VERSION_HTTP2
case GSTCURL_HTTP_VERSION_2_0:
GST_DEBUG_OBJECT (s, "Setting version as HTTP/2.0");
- gst_curl_setopt_int (s, handle, CURLOPT_HTTP_VERSION,
- CURL_HTTP_VERSION_2_0);
+ if (curl_easy_setopt (handle, CURLOPT_HTTP_VERSION,
+ CURL_HTTP_VERSION_2_0) != CURLE_OK) {
+ if (gst_curl_http_src_curl_capabilities->features &
CURL_VERSION_HTTP2) {
+ GST_WARNING_OBJECT (s,
+ "Cannot set unsupported option CURLOPT_HTTP_VERSION");
+ } else {
+ GST_INFO_OBJECT (s, "HTTP/2 unsupported by libcurl at this time");
+ }
+ }
break;
#endif
default:
--
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