From fa939220dfff7607ed7b0522b549ecb482a5e1ac Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 17 Nov 2017 16:48:37 +0100 Subject: url: reject ASCII control characters and space in host names Host names like "127.0.0.1 moo" would otherwise be accepted by some getaddrinfo() implementations. Updated test 1034 and 1035 accordingly. Fixes #2073 Closes #2092 --- tests/data/test1034 | 25 +++++-------------------- tests/data/test1035 | 21 +++++---------------- 2 files changed, 10 insertions(+), 36 deletions(-) (limited to 'tests') diff --git a/tests/data/test1034 b/tests/data/test1034 index 6c1beb671..beab0d3c0 100644 --- a/tests/data/test1034 +++ b/tests/data/test1034 @@ -13,24 +13,17 @@ config file # # Server-side - -HTTP/1.0 503 Service Unavailable -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake swsclose -Content-Type: text/html -Funny-head: yesyes - - # # Client-side -http +none idn +http LC_ALL= @@ -54,17 +47,9 @@ url = "http://invalid-utf8- # -# Verify data after the test has been "shot" - -^User-Agent:.* - - -GET http://invalid-utf8-â.local/page/1034 HTTP/1.1 -Host: invalid-utf8-â.local -Accept: */* -Proxy-Connection: Keep-Alive - - + +3 + diff --git a/tests/data/test1035 b/tests/data/test1035 index 033a48a72..a316c51e1 100644 --- a/tests/data/test1035 +++ b/tests/data/test1035 @@ -12,24 +12,17 @@ FAILURE # # Server-side - -HTTP/1.0 503 Service Unavailable -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake swsclose -Content-Type: text/html -Funny-head: yesyes - - # # Client-side -http +none idn +http LC_ALL= @@ -52,12 +45,8 @@ http://too-long-IDN-name-cĂźrl-rĂźles-la-la-la-dee-da-flooby-nooby.local/page/10 ^User-Agent:.* - -GET http://too-long-IDN-name-cĂźrl-rĂźles-la-la-la-dee-da-flooby-nooby.local/page/1035 HTTP/1.1 -Host: too-long-IDN-name-cĂźrl-rĂźles-la-la-la-dee-da-flooby-nooby.local -Accept: */* -Proxy-Connection: Keep-Alive - - + +3 + -- cgit v1.2.3