Repository navigation
Conversation
|
I like this idea, I have read of it a few times, as recently as last month. What do you think about using the existing CURL_HTTP_VERSION_X_X enumerations for getinfo, and then for the tool something like: verstring = ((ver == CURL_HTTP_VERSION_2_0) ? "2.0" :
(ver == CURL_HTTP_VERSION_1_1) ? "1.1" :
(ver == CURL_HTTP_VERSION_1_0) ? "1.0" : "0"); |
|
I've updated the patch to use CURL_HTTP_VERSION now. |
|
👍 to merge first thing after the pending release |
|
Note that the travis-ci test failure is because the new symbol is not properly added to |
|
I've added it to symbols-in-versions now. |
|
Ganesh Nikam just posted a version of this patch on the mailing list: https://curl.haxx.se/mail/lib-2016-05/0131.html He included a little example in his man page that could be merged into this patch to make it perfect I think! |
There was a problem hiding this comment.
I think the string "2.0" would be better here instead of "2".
There was a problem hiding this comment.
The consensus seems to be that it's http 2, not 2.0. See e.g. https://http2.github.io/faq/#is-it-http20-or-http2
There was a problem hiding this comment.
The protocol is named HTTP/2 and there's no ".0" in the name or the version. I think we avoid a lot of problems by sticking to the official name.
Adds access to the effectively used http version to both libcurl and curl.
Adds access to the effectively used http version to both libcurl and curl.
Initial attempt, almost certainly not final yet.