Skip to content

http: better error message for HTTP/1.x response without status line - #13045

Closed
mkauf wants to merge 1 commit into
curl:masterfrom
mkauf:http_weird_statusline
Closed

mkauf wants to merge 1 commit into
curl:masterfrom
mkauf:http_weird_statusline

Conversation

@mkauf

@mkauf mkauf commented Mar 4, 2024 •

Copy link
Copy Markdown
Contributor

If a response without a status line is received, and the connection is known to use HTTP/1.x (not HTTP/0.9), report the error "Invalid status line" instead of "Received HTTP/0.9 when not allowed".

@github-actions github-actions Bot added the tests label Mar 4, 2024
@mkauf mkauf added HTTP tests and removed tests labels Mar 4, 2024
@mkauf
mkauf force-pushed the http_weird_statusline branch from 76decca to 0357157 Compare March 4, 2024 18:52
@bagder

bagder commented Mar 4, 2024

Copy link
Copy Markdown
Member

The first line coming from a HTTP/1.0 or HTTP/1.1 server is called the Status Line. The headers start after that initial line.

If a response without a status line is received, and the connection is
known to use HTTP/1.x (not HTTP/0.9), report the error "Invalid status
line" instead of "Received HTTP/0.9 when not allowed".
@mkauf
mkauf force-pushed the http_weird_statusline branch from 0357157 to b00210a Compare March 5, 2024 09:10
@mkauf mkauf changed the title http: better error message for weird HTTP/1.x response without headers http: better error message for HTTP/1.x response without status line Mar 5, 2024
@mkauf

mkauf commented Mar 5, 2024

Copy link
Copy Markdown
Contributor Author

@bagder : Thanks, I have updated this pull request.

@bagder

bagder commented Mar 5, 2024

Copy link
Copy Markdown
Member

Thanks!

@bagder bagder closed this in df1fcb4 Mar 5, 2024
@mkauf
mkauf deleted the http_weird_statusline branch March 5, 2024 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants