mirror of
https://github.com/curl/curl.git
synced 2024-12-27 06:59:43 +08:00
70f1b540f3
Expansions whose output starts with NUL were being expanded to the empty string, and not being recognised as values that contain a NUL byte, and should error. Closes #11694
34 lines
451 B
Plaintext
34 lines
451 B
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
variables
|
|
</keywords>
|
|
</info>
|
|
|
|
#
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
http
|
|
</server>
|
|
<name>
|
|
Variable output starting with null byte
|
|
</name>
|
|
<file name="%LOGDIR/junk">
|
|
%hex[%00]hex%hello
|
|
</file>
|
|
<command>
|
|
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --variable what@%LOGDIR/junk --expand-data "{{what}}"
|
|
</command>
|
|
</client>
|
|
|
|
#
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<errorcode>
|
|
2
|
|
</errorcode>
|
|
</verify>
|
|
</testcase>
|