-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Unable to See Status Code in Output #1300
Comments
Hey @EarthCitizen! I can't seem to reproduce your problem locally with $ http pie.dev/status/401
HTTP/1.1 401 Unauthorized
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
CF-Cache-Status: DYNAMIC
CF-RAY: 6e1666df9854506f-IST
Connection: keep-alive
Content-Length: 0
Date: Tue, 22 Feb 2022 07:11:42 GMT
NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=jIQvWvDlmjODsJJ9KskFBgjGCj8C%2FEWfor2vtcajcyNx36NEkDzcQF0BcNBpcTEUcFVswHvxYfZaJIyPlSBFyaMu81PGM51CpX36RWBkZUcSxMOIPvOkN8IY"}],"group":"cf-nel","max_age":604800}
Server: cloudflare
WWW-Authenticate: Basic realm="Fake Realm"
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400 If it is possible, would you mind sharing the underlying server code that returns this response? This was, we could have a reliable reproducer to test and hopefully fix this issue. |
I did some additional testing. Spring Boot does not send a reason phrase on the status line of the response: Spring Boot raw status line:
Which in HTTPie results in:
When I do a similar test with Python http.server, HTTPie does show the status code: Python http.server raw status line:
Python http.server:
So the issue here would seem to be that HTTPie fails to display a status code when the status line lacks a reason phrase. |
For an example Spring Boot project: Click "Generate" on that page, which will download a zip. In that project folder, run this to start the server:
This will start a server on port 8080, which should give 404 for any request as no endpoints defined. |
@isidentical I think this was introduced with the addition of the Pie theme. Please see #811. |
@EarthCitizen thanks a lot for sharing the root cause. From that, I was able to make a reproducer via Python's |
Checklist
Minimal reproduction code and steps
Current result
Curl output:
HTTPie output:
Expected result
Expecting to see
HTTP/1.1 401
instead of justHTTP/1.1
.Debug output
Please re-run the command with
--debug
, then copy the entire command & output and paste both below:The text was updated successfully, but these errors were encountered: