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

Protocol HTTP display error #38

Open
21ki opened this issue Jan 6, 2021 · 2 comments
Open

Protocol HTTP display error #38

21ki opened this issue Jan 6, 2021 · 2 comments
Labels
kind/question a question

Comments

@21ki
Copy link

21ki commented Jan 6, 2021

image

@ldez ldez changed the title http协议显示错误 Protocol HTTP display error Jan 6, 2021
@ldez ldez added the kind/question a question label Feb 13, 2022
@ldy985

This comment was marked as off-topic.

@fbuetler
Copy link

fbuetler commented Mar 7, 2024

I stumbled over the same. This is not a bug but intended by the go standard library as http2 is transmitted in binary format. They decided to print the HTTP1.1 equivalent request.

It is even hard coded in the http/Request.Write(w io.Writer) that whoami is using to print the request.

A bit more context is given in the documentation for httputil/DumpRequest.

However, whoami logs the correct protocl used if you use the -verbose flag:

2024/03/07 15:08:17 127.0.0.1:41214 - - [07/Mar/2024:15:08:17 +0100] "GET / HTTP/2.0" - -

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

No branches or pull requests

4 participants