mirror of
https://github.com/curl/curl.git
synced 2026-08-25 13:43:31 +03:00
http: write last header line late
- HEADERFUNCTIONS might inspect response properties like CURLINFO_CONTENT_LENGTH_DOWNLOAD_T on seeing the last header line. If the line is being written before this is initialized, values are not available. - write the last header line late when analyzing a HTTP response so that all information is available at the time of the writing. - add test1485 to verify that CURLINFO_CONTENT_LENGTH_DOWNLOAD_T works on seeing the last header. Fixes #13752 Reported-by: Harry Sintonen Closes #13757
This commit is contained in:
parent
548d169c9c
commit
17af2bca58
5 changed files with 247 additions and 32 deletions
51
tests/data/test1485
Normal file
51
tests/data/test1485
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
HTTP
|
||||
HTTP GET
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
# Server-side
|
||||
<reply>
|
||||
<data>
|
||||
HTTP/1.1 200 OK
|
||||
Server: Someone
|
||||
Content-Length: 7
|
||||
|
||||
123456
|
||||
</data>
|
||||
<datacheck>
|
||||
HTTP/1.1 200 OK
|
||||
Server: Someone
|
||||
Content-Length: 7
|
||||
|
||||
123456
|
||||
</datacheck>
|
||||
</reply>
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<tool>
|
||||
lib%TESTNUMBER
|
||||
</tool>
|
||||
<name>
|
||||
get curlinfo on last header in callback
|
||||
</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
|
||||
Accept: */*
|
||||
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue