mirror of
https://github.com/curl/curl.git
synced 2026-07-28 13:03:07 +03:00
content_encoding: Transfer-Encoding parser improvements
- allow and ignore "identity" as an encoding - fail if any other encoder than chunked follows after chunked - fail on unsolicited encodings - when the server encodes but curl did not ask for it Add test 1493 to 1496 to verify. Disable test 319 as that is now broken: issue #16974 Reported-by: Jonathan Rosa Fixes #16956 Closes #16959
This commit is contained in:
parent
3454844f36
commit
b8bd019c6a
8 changed files with 255 additions and 7 deletions
53
tests/data/test1495
Normal file
53
tests/data/test1495
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
HTTP
|
||||
HTTP GET
|
||||
chunked Transfer-Encoding
|
||||
DELAY
|
||||
</keywords>
|
||||
</info>
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data crlf="yes" nocheck="yes">
|
||||
HTTP/1.1 200 funky chunky!
|
||||
Server: fakeit/0.9 fakeitbad/1.0
|
||||
Transfer-Encoding: chunked, identity
|
||||
Content-Length: 19
|
||||
|
||||
stuff server sends
|
||||
</data>
|
||||
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<name>
|
||||
HTTP GET with chunked + identity in TE header
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -D %LOGDIR/heads%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>
|
||||
<errorcode>
|
||||
61
|
||||
</errorcode>
|
||||
</verify>
|
||||
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue