mirror of
https://github.com/curl/curl.git
synced 2026-08-24 11:13:39 +03:00
http: better error message for HTTP/1.x response without status 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". Closes #13045
This commit is contained in:
parent
a54d0bdc65
commit
df1fcb41e2
4 changed files with 134 additions and 0 deletions
58
tests/data/test1480
Normal file
58
tests/data/test1480
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
HTTP
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
HTTP/1.1 100 Continue
|
||||
Foo: Bar
|
||||
|
||||
Data
|
||||
Data
|
||||
Data
|
||||
</data>
|
||||
<datacheck>
|
||||
</datacheck>
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<name>
|
||||
HTTP Continue response without final response
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<protocol>
|
||||
GET /%TESTNUMBER HTTP/1.1
|
||||
Host: %HOSTIP:%HTTPPORT
|
||||
User-Agent: curl/%VERSION
|
||||
Accept: */*
|
||||
|
||||
</protocol>
|
||||
|
||||
# Hyper curl returns unsupported protocol
|
||||
# built-in curl returns weird_server_reply
|
||||
<errorcode>
|
||||
%if hyper
|
||||
1
|
||||
%else
|
||||
8
|
||||
%endif
|
||||
</errorcode>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue