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

Missing reason in Status-Line #4

Open
jkbrzt opened this issue Feb 8, 2015 · 2 comments
Open

Missing reason in Status-Line #4

jkbrzt opened this issue Feb 8, 2015 · 2 comments
Labels

Comments

@jkbrzt
Copy link
Member

jkbrzt commented Feb 8, 2015

Should be HTTP/2 200 OK

image

https://github.com/jakubroztocil/httpie/blob/337c05f95cc3b5435f9a7718bbd62debbf282d31/httpie/models.py#L66

// cc @Lukasa

@jkbrzt jkbrzt added the bug label Feb 8, 2015
@Lukasa
Copy link

Lukasa commented Feb 8, 2015

Note that the reason is missing because it isn't valid in HTTP/2. From the spec, section 8.1.2.4:

HTTP/2 does not define a way to carry the version or reason phrase
that is included in an HTTP/1.1 status line.

A simple option is for HTTPie to add back in the reason phrase automatically if not present. Another option is for hyper to do that. Another another option is to do whatever cURL does. Another another another option is to come up with a new approach of rendering HTTP/2 requests.

@jkbrzt
Copy link
Member Author

jkbrzt commented Feb 8, 2015

I see, It's a tricky one. I haven't finished reading the spec yet, but adopting a formatting similar to the one used in the examples section, where v1.1 vs. v2 messages are compared, might also be an option:


     GET /resource HTTP/1.1           HEADERS
     Host: example.org          ==>     + END_STREAM
     Accept: image/jpeg                 + END_HEADERS
                                          :method = GET
                                          :scheme = https
                                          :path = /resource
                                          host = example.org
                                          accept = image/jpeg


     HTTP/1.1 304 Not Modified        HEADERS
     ETag: "xyzzy"              ==>     + END_STREAM
     Expires: Thu, 23 Jan ...           + END_HEADERS
                                          :status = 304
                                          etag = "xyzzy"
                                          expires = Thu, 23 Jan ...

https://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-8.1.3

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

2 participants