Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request incorrectly shows HTTP/1.1 instead of HTTP/2 #2

Open
jkbrzt opened this issue Feb 7, 2015 · 4 comments
Open

Request incorrectly shows HTTP/1.1 instead of HTTP/2 #2

jkbrzt opened this issue Feb 7, 2015 · 4 comments
Labels

Comments

@jkbrzt
Copy link
Member

jkbrzt commented Feb 7, 2015

It's hardcoded in HTTPie. Unclear how to obtain the actual version.

$ http -v  https://nghttp2.org/httpbin/get
GET /httpbin/get HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Host: nghttp2.org
User-Agent: HTTPie/0.9.1
HTTP/2 200
access-control-allow-credentials: true
access-control-allow-origin: *
content-length: 268
content-type: application/json
date: Sat, 07 Feb 2015 17:02:52 GMT
server: nghttpx nghttp2/0.7.4-DEV
strict-transport-security: max-age=31536000
via: 1.1 nghttpx
@jkbrzt jkbrzt added the bug label Feb 7, 2015
@jkbrzt jkbrzt changed the title Request shows HTTP/1.1 Request incorrectly shows HTTP/1.1 instead of HTTP/2 Feb 7, 2015
@Lukasa
Copy link

Lukasa commented Feb 7, 2015

Arguably the more important fact is that the notion of a 'request line' doesn't exist in HTTP/2. Instead there are pseudo-headers: :method, :scheme, :authority, and :path.

@Lukasa
Copy link

Lukasa commented Feb 7, 2015

I wonder what cURL does. That feels like the correct model to follow.

@jinleileiking
Copy link

I the same. return 1.1

@jinleileiking
Copy link

➜  tools git:(master) ✗ http https://nghttp2.org/httpbin/get
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Connection: close
Content-Length: 256
Content-Type: application/json
Date: Tue, 16 May 2017 08:41:55 GMT
Server: nghttpx
Strict-Transport-Security: max-age=31536000
Via: 1.1 nghttpx
X-Backend-Header-Rtt: 0.002316
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block

{
    "args": {},
    "headers": {
        "Accept": "*/*",
        "Accept-Encoding": "gzip, deflate",
        "Host": "nghttp2.org",
        "User-Agent": "HTTPie/0.9.9",
        "Via": "1.1 nghttpx"
    },
    "origin": "120.92.8.170",
    "url": "https://nghttp2.org/httpbin/get"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants