curl-users
Re: Curl and HTTP/2
Date: Fri, 22 Aug 2014 19:58:30 +0200
Git clone installs the version 7.35.0, it even shows the error 'curl: (1) Unsupported protocol’ when I run the curl command with —http2 option. I have installed the version 7.37.1 on Ubuntu, which should be newer. Is there an even newer version than this one? And if there is, where can I find it?
Thank you for the help, I really appreciate it.
Best regards,
Bisera
On 22 Aug 2014, at 17:59, Tatsuhiro Tsujikawa <tatsuhiro.t_at_gmail.com> wrote:
>
>
>
> On Sat, Aug 23, 2014 at 12:37 AM, Bisera Milosheska <biseramilosheska_at_gmail.com> wrote:
> Yes, I am talking about the latest one, draft-14. I am sorry about the command, it is actually the syntax for h2load that is like that. However, I have still problems with the following command:
>
> curl --http2 -k -s -D - https://10.0.0.10:8080/index.html -o /dev/null
>
> to which I get the following response from the server:
>
> SSL/TLS handshake completed
> The negotiated protocol: h2-14
> [id=1] [191.942] send SETTINGS frame <length=6, flags=0x00, stream_id=0>
> (niv=1)
> [SETTINGS_MAX_CONCURRENT_STREAMS(0x03):100]
> [id=1] [191.981] recv SETTINGS frame <length=0, flags=0x00, stream_id=0>
> (niv=0)
> [id=1] [191.981] recv (stream_id=1, noind=0) :method: GET
> [id=1] [191.981] recv (stream_id=1, noind=0) :path: /index.html
> [id=1] [191.981] recv (stream_id=1, noind=0) :scheme: https
> [id=1] [191.981] recv (stream_id=1, noind=0) user-agent: curl/7.37.1
> [id=1] [191.981] recv (stream_id=1, noind=0) :authority: 10.0.0.10:8080
> [id=1] [191.981] send SETTINGS frame <length=0, flags=0x01, stream_id=0>
> ; ACK
> (niv=0)
> [id=1] [191.981] send RST_STREAM frame <length=4, flags=0x00, stream_id=1>
> (error_code=PROTOCOL_ERROR(0x01))
> [id=1] [191.981] stream_id=1 closed
> [id=1] [191.981] recv SETTINGS frame <length=0, flags=0x01, stream_id=0>
> ; ACK
> (niv=0)
>
> Curl is waiting for a response and the process runs until I stop it.
>
> Thank you for your promptness.
>
>
> h2-14 needs to latest curl master branch. This is because h2-14 now requires :authority header field must be put before user-agent header field. The released curl probably does not include this change.
> Please try git clone latest curl master branch.
>
> Best regards,
> Tatsuhiro Tsujikawa
>
>
> --
>
> Bisera
>
> On 22 Aug 2014, at 17:03, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
>> On Fri, 22 Aug 2014, Bisera Milosheska wrote:
>>
>>> I have the latest version of curl, 7.37.1. It is supposed to support http2, but when I try to do a request to a nghttpd server(which is part of the nghttp2 implementation) that supports http2, the server answers that the client did not advertise HTTP/2 protocol. This is my command:
>>>
>>> curl --http2 -k -n100 -c10 -m10 'https://10.0.0.10:8080/index.html'
>>
>> Did you really use "-n100" in the command line? What is that supposed to do? I would suspect it could be the reason for your problems. The -c10 looks highly suspicious too even if I don't think it'll damage anything used like that.
>>
>> We need more details. Like perhaps your -v output, and perhaps even a curl -V output.
>>
>> I just tried again and curl (git HEAD) speaks http2 h2-14 fine with nghttp2.org. We did fix up a few things in git since that release to adapt better to draft-14 specific changes but I'm not sure how important those details are.
>>
>> Perhaps you can get the latest git/daily snapshot and see if it makes a difference for you?
>>
>> You are talking about the latest and greated http2 draft here, right?
>>
>> --
>>
>> / 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
>
>
> -------------------------------------------------------------------
> 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-22