cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Curl and HTTP/2

From: Bisera Milosheska <biseramilosheska_at_gmail.com>
Date: Sat, 23 Aug 2014 16:20:54 +0200

I tried the git clone on another machine(which may have had the standard curl package previously installed with apt-get), because I didn’t want to mess up something on the machine I was working on. That was the response I got after downloading curl from the repository on the other machine. So my explanation is that I was getting the answer from the older version of curl.

Good note about the OpenSSL version, I am also very confused now. Despite the fact that curl is build with OpenSSL/1.0.1f, which is not supposed to support ALPN, h2-14 is still negotiated when TLS is used on the server side.

Request:

        curl --http2 -k 'https://10.0.0.10:8080/index.html' -s -D - -o /dev/null

Response:

      SSL/TLS handshake completed
The negotiated protocol: h2-14
[id=1] [151.000] send SETTINGS frame <length=6, flags=0x00, stream_id=0>
          (niv=1)
          [SETTINGS_MAX_CONCURRENT_STREAMS(0x03):100]
[id=1] [151.002] recv SETTINGS frame <length=0, flags=0x00, stream_id=0>
          (niv=0)
[id=1] [151.002] recv (stream_id=1, noind=0) :method: GET
[id=1] [151.002] recv (stream_id=1, noind=0) :path: /index.html
[id=1] [151.002] recv (stream_id=1, noind=0) :scheme: https
[id=1] [151.002] recv (stream_id=1, noind=0) :authority: 10.0.0.10:8080
[id=1] [151.002] recv (stream_id=1, noind=0) user-agent: curl/7.38.0-20140822
[id=1] [151.002] recv (stream_id=1, noind=0) accept: */*
[id=1] [151.002] recv HEADERS frame <length=36, flags=0x05, stream_id=1>
          ; END_STREAM | END_HEADERS
          (padlen=0)
          ; Open new stream
[id=1] [151.003] send SETTINGS frame <length=0, flags=0x01, stream_id=0>
          ; ACK
          (niv=0)
[id=1] [151.003] send HEADERS frame <length=89, flags=0x04, stream_id=1>
          ; END_HEADERS
          (padlen=0)
          ; First response header
          :status: 200
          server: nghttpd nghttp2/0.6.0-DEV
          content-length: 119625
          cache-control: max-age=3600
          date: Sat, 23 Aug 2014 10:32:53 GMT
          last-modified: Fri, 22 Aug 2014 13:17:09 GMT
[id=1] [151.003] send DATA frame <length=4096, flags=0x00, stream_id=1>
[id=1] [151.003] send DATA frame <length=4096, flags=0x00, stream_id=1>
[id=1] [151.003] send DATA frame <length=4096, flags=0x00, stream_id=1>

However, when I start the sever with the —no-tls option and I request the same resource only via http, I get this response:

[id=1] [ 8.131] send SETTINGS frame <length=6, flags=0x00, stream_id=0>
          (niv=1)
          [SETTINGS_MAX_CONCURRENT_STREAMS(0x03):100]
[id=1] [ 8.132] closed

Do you have any idea why this might be so? Also, I am trying for quite some time already to find a way to upgrade the OpenSSL version and I cannot succeed. I have tried to get it from different resources too and it is not recognised. 1.0.1f is the version which ‘apt-get installs’ and ’sudo apt-get update’, ’sudo apt-get upgrade’ and ’sudo apt-get dist-upgrade’ don’t help either.

Best regards,
Bisera

On 22 Aug 2014, at 23:28, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Fri, 22 Aug 2014, Bisera Milosheska wrote:
>
>> Yes, I got it from github.com/bagder/curl. This is what I was getting when running ’curl -V’:
>>
>> curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
>
> This basically only gives me more questions.
>
> First: getting 7.35.0 from git is possible but takes an effort to check out the correct old tags, which I doubt you did. That sort of implies that the "curl -V" output you show here is not the same curl version you built from git.
>
> Secondly: OpenSSL/1.0.1f doesn't have ALPN support, does it? So when you build or get the correct curl version, aren't you using this OpenSSL version for that as well? How does that work?
>
> (HTTP/2 over HTTPS requires ALPN - a recent TLS exension - for those not up to speed with these details.)
>
> --
>
> / daniel.haxx.se-------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-08-23