mirror of
https://github.com/curl/curl.git
synced 2026-04-12 12:21:42 +08:00
If a string argument is expected and the first two bytes are 0xe2 ex80 and the third has the 7th bit set, that's enough for curl to warn. Previously we tried to detect and warn only for the unicode double quote, but users might use single quotes, other quotes or even lead the argument with one of the "zero widths" characters. This is an attempt to detect many of those. Without triggering for "normal" IDN hostnames. Closes #18459
53 lines
816 B
Plaintext
53 lines
816 B
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
</keywords>
|
|
</info>
|
|
|
|
#
|
|
# Server-side
|
|
<reply>
|
|
<data crlf="yes">
|
|
HTTP/1.1 200 OK
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
Server: test-server/fake
|
|
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
|
|
ETag: "21025-dc7-39462498"
|
|
Accept-Ranges: bytes
|
|
Content-Length: 6
|
|
Connection: close
|
|
Content-Type: text/html
|
|
Funny-head: yesyes
|
|
|
|
-foo-
|
|
</data>
|
|
</reply>
|
|
|
|
#
|
|
# Client-side
|
|
<client>
|
|
<features>
|
|
!win32
|
|
</features>
|
|
<server>
|
|
http
|
|
</server>
|
|
<name>
|
|
warn about Unicode quote character
|
|
</name>
|
|
<command>
|
|
-H %hex[%e2%80%9c]hex%host: %HOSTIP:%HTTPPORT/%hex[%e2%80%9c]hex% -s
|
|
</command>
|
|
</client>
|
|
|
|
#
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<stderr>
|
|
%hex[Warning: The argument '%e2%80%9chost:' starts with a Unicode character. Maybe ASCII ]hex%
|
|
Warning: was intended?
|
|
</stderr>
|
|
</verify>
|
|
</testcase>
|