urlapi: fix redirect handling if CURLU_NO_GUESS_SCHEME is set

Verified by test 1967

Reported-by: Joshua Rogers
Closes #21721
This commit is contained in:
Daniel Stenberg 2026-05-21 23:00:55 +02:00
parent 8e549fbdd3
commit 7e350dd147
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 77 additions and 4 deletions

View file

@ -239,7 +239,7 @@ test1916 test1917 test1918 test1919 test1920 test1921 \
test1933 test1934 test1935 test1936 test1937 test1938 test1939 test1940 \
test1941 test1942 test1943 test1944 test1945 test1946 test1947 test1948 \
test1955 test1956 test1957 test1958 test1959 test1960 test1964 test1965 \
test1966 \
test1966 test1967 \
\
test1970 test1971 test1972 test1973 test1974 test1975 test1976 test1977 \
test1978 test1979 test1980 test1981 test1982 test1983 test1984 \

30
tests/data/test1967 Normal file
View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
<info>
<keywords>
HTTP
urlapi
</keywords>
</info>
<client>
<name>
curl_url_set() a URL without guessing a scheme
</name>
<tool>
lib%TESTNUMBER
</tool>
<command>
http://%HOSTIP:%NOLISTENPORT/not-there/%TESTNUMBER
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<stdout mode="text">
URL http://a.b/x
</stdout>
</verify>
</testcase>