mirror of
https://github.com/curl/curl.git
synced 2026-04-13 00:31:41 +08:00
- runtests: fix `codeset-utf8` feature detection. Before this patch it detected if the calling environment had UTF-8 enabled. If not, UTF-8 tests were all skipped. After this patch, it detects if UTF-8 is supported by the calling environment regardless of what's currently enabled. Follow-up to0b70b23ef4#15039 - GHA/linux: sync `codeset-test` to also reset `LC_CTYPE` and `LC_NUMBER`. To give it more spin. Follow-up toc221c0ee59#17938 - GHA/macos: fix to actually enable `codeset-test`. Also set `LC_ALL`, which seems necessary to trigger issues. Follow-up toc221c0ee59#17938 - tests/data: replace `LC_CTYPE` env with `LC_ALL` in all tests requiring a locale. Also to avoid potential issues with a blank or unset `LC_ALL`, as seen earlier. And to ensure that the override works on all platforms (as tested in CI.) Slight downside is that this now resets the language/culture to `C`. Ref:b4c9982382#4743 Ref:23208e330a#4738 - replace `en_US.UTF-8` with `C.UTF-8` to be language/culture-agnostic. - TEST-SUITE.md: drop `UTF-8` as a requirement for tests. Tests shall work (or least be skipped) without UTF-8 support. Tests requiring UTF-8 locale: 165, 962, 963, 964, 965, 966, 967, 1448, 1560, 2046, 2047 Tests requiring UTF-8 locale, but passing without one anyway: 955, 956, 957, 958, 959, 960, 961, 968, 1034, 1035 Spec 1997: https://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html Spec 2008: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html Ref:c221c0ee59#17938 Ref:7cf8414fabRef:4c140a5628Ref:28faaacee2#2436 Ref:ecd1d020abCloses #17988
96 lines
1.5 KiB
Plaintext
96 lines
1.5 KiB
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
HTTP GET
|
|
IDN
|
|
followlocation
|
|
--resolve
|
|
--write-out
|
|
</keywords>
|
|
</info>
|
|
|
|
#
|
|
# Server-side
|
|
<reply>
|
|
<data nocheck="yes">
|
|
HTTP/1.1 302 OK swsbounce
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
Content-Length: 9
|
|
Content-Type: text/plain
|
|
Location: ./%TESTNUMBER0001
|
|
|
|
redirect
|
|
</data>
|
|
<data1 nocheck="yes">
|
|
HTTP/1.1 200 OK
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
Content-Length: 3
|
|
Content-Type: text/plain; charset=us-ascii
|
|
|
|
OK
|
|
</data1>
|
|
</reply>
|
|
|
|
#
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
http
|
|
</server>
|
|
<features>
|
|
IDN
|
|
codeset-utf8
|
|
</features>
|
|
<setenv>
|
|
LC_ALL=C.UTF-8
|
|
</setenv>
|
|
<name>
|
|
Connection reuse with IDN host name
|
|
</name>
|
|
|
|
<command>
|
|
http://%hex[%c3%a5%c3%a4%c3%b6]hex%.se:%HTTPPORT/%TESTNUMBER --resolve xn--4cab6c.se:%HTTPPORT:%HOSTIP -w "%{num_connects}\n%{num_redirects}\n%{size_download}\n%{url_effective}\n%{content_type}\n%{response_code}\n" -L
|
|
</command>
|
|
</client>
|
|
|
|
#
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<protocol>
|
|
GET /%TESTNUMBER HTTP/1.1
|
|
Host: xn--4cab6c.se:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
|
|
GET /%TESTNUMBER0001 HTTP/1.1
|
|
Host: xn--4cab6c.se:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
|
|
</protocol>
|
|
|
|
<stdout>
|
|
HTTP/1.1 302 OK swsbounce
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
Content-Length: 9
|
|
Content-Type: text/plain
|
|
Location: ./%TESTNUMBER0001
|
|
|
|
HTTP/1.1 200 OK
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
Content-Length: 3
|
|
Content-Type: text/plain; charset=us-ascii
|
|
|
|
OK
|
|
1
|
|
1
|
|
3
|
|
http://%hex[%c3%a5%c3%a4%c3%b6]hex%.se:%HTTPPORT/%TESTNUMBER0001
|
|
text/plain; charset=us-ascii
|
|
200
|
|
</stdout>
|
|
|
|
</verify>
|
|
</testcase>
|