]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: updated tests for Hyper
authorDaniel Stenberg <daniel@haxx.se>
Mon, 14 Dec 2020 13:10:33 +0000 (14:10 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 18 Dec 2020 08:58:04 +0000 (09:58 +0100)
tests/data/test15
tests/data/test17
tests/data/test24
tests/data/test28
tests/data/test31
tests/data/test40
tests/data/test42
tests/data/test54
tests/data/test56
tests/data/test60

index a82fa0cf63376508de0137f0c5849526a98c0387..b71588f4ed51c0fb5be7ff82511026bed9b949b7 100644 (file)
@@ -9,7 +9,7 @@ HTTP GET
 # Server-side
 <reply>
 <data nocheck="yes">
-HTTP/1.4 200 OK\r
+HTTP/1.1 200 OK\r
 Fake: yes\r
 Fake: yes\r
 Fake: yes\r
@@ -35,7 +35,7 @@ http://%HOSTIP:%HTTPPORT/want/15 --write-out "%{url_effective} %{http_code} %{si
 # Verify data after the test has been "shot"
 <verify>
 <stdout>
-HTTP/1.4 200 OK\r
+HTTP/1.1 200 OK\r
 Fake: yes\r
 Fake: yes\r
 Fake: yes\r
index de03c1de0b7af401c45db3dbcf39bd80bb518da5..fe423b334ae9d25c04ed1abed232e33c1e3fcc61 100644 (file)
@@ -11,7 +11,7 @@ config file
 <data>
 HTTP/1.1 200 OK
 Funny-head: yesyes
-Content-Length: 27\r
+Content-Length: 27
 
 This is the proof it works
 </data>
index 54147eddfd2f7720eb7398c5be28a56eccb91715..43e2da5b573f106ef1239f5fa9b0b9bb987739ef 100644 (file)
@@ -41,7 +41,7 @@ Accept: */*
 22
 </errorcode>
 <file2 name="log/stderr24" mode="text">
-curl: (22) The requested URL returned error: 404 BAD BOY
+curl: (22) The requested URL returned error: 404
 </file2>
 </verify>
 </testcase>
index 703c6d35b0cc2fe706c6f43557d31d03da0b205c..8aee090c3f7b1ff7258e81c31600489e28d4c2b3 100644 (file)
@@ -30,7 +30,11 @@ If this is received, the location following worked
 HTTP/1.1 301 This is a weirdo text message swsclose
 Date: Thu, 09 Nov 2010 14:49:00 GMT
 Server: test-server/fake
+%if hyper
+Location: /online/1,1795,Welcome,00.html/280002.txt?logout=TRUE
+%else
 Location:  /online/1,1795,Welcome,00.html/280002.txt?logout=TRUE
+%endif
 Connection: close
 
 HTTP/1.1 200 Followed here fine swsclose
index c3b1e04ba4906eeb3a5ebb6a1815ed6aaaf469e6..3ec00833ef1ef070db7ad8cf65119ea4e64cf56c 100644 (file)
@@ -8,6 +8,12 @@ cookiejar
 </keywords>
 </info>
 # Server-side
+#
+# The cookies set come in two versions. This is because when curl is built
+# with Hyper, the API provides the headers already "sanitized" so we cannot
+# compapare with the exact server contents unlesss it too sends the data
+# "clean".
+
 <reply>
 <data>
 HTTP/1.1 200 OK\r
@@ -16,6 +22,7 @@ Server: test-server/fake
 Content-Length: 4\r
 Content-Type: text/html\r
 Funny-head: yesyes\r
+%if !hyper
 Set-Cookie: foobar=name; domain=anything.com; path=/ ; secure\r
 Set-Cookie:ismatch=this  ; domain=127.0.0.1; path=/silly/\r
 Set-Cookie: overwrite=this  ; domain=127.0.0.1; path=/overwrite/\r
@@ -57,6 +64,49 @@ Set-Cookie: withspaces=  yes  within and around    ;
 Set-Cookie: withspaces2 =before equals;\r
 Set-Cookie: prespace=  yes before;\r
 Set-Cookie: securewithspace=after    ; secure =\r
+%else
+Set-Cookie: foobar=name; domain=anything.com; path=/ ; secure\r
+Set-Cookie: ismatch=this  ; domain=127.0.0.1; path=/silly/\r
+Set-Cookie: overwrite=this  ; domain=127.0.0.1; path=/overwrite/\r
+Set-Cookie: overwrite=this2  ; domain=127.0.0.1; path=/overwrite\r
+Set-Cookie: sec1value=secure1  ; domain=127.0.0.1; path=/secure1/ ; secure\r
+Set-Cookie: sec2value=secure2  ; domain=127.0.0.1; path=/secure2/ ; secure=\r
+Set-Cookie: sec3value=secure3  ; domain=127.0.0.1; path=/secure3/ ; secure=\r
+Set-Cookie: sec4value=secure4  ; secure=; domain=127.0.0.1; path=/secure4/ ;\r
+Set-Cookie: sec5value=secure5  ; secure; domain=127.0.0.1; path=/secure5/ ;\r
+Set-Cookie: sec6value=secure6  ; secure ; domain=127.0.0.1; path=/secure6/ ;\r
+Set-Cookie: sec7value=secure7  ; secure   ; domain=127.0.0.1; path=/secure7/ ;\r
+Set-Cookie: sec8value=secure8  ; secure= ; domain=127.0.0.1; path=/secure8/ ;\r
+Set-Cookie: secure=very1  ; secure=; domain=127.0.0.1; path=/secure9/;\r
+Set-Cookie: httpo1=value1  ; domain=127.0.0.1; path=/p1/; httponly\r
+Set-Cookie: httpo2=value2  ; domain=127.0.0.1; path=/p2/; httponly=\r
+Set-Cookie: httpo3=value3  ; httponly; domain=127.0.0.1; path=/p3/;\r
+Set-Cookie: httpo4=value4  ; httponly=; domain=127.0.0.1; path=/p4/;\r
+Set-Cookie: httponly=myvalue1  ; domain=127.0.0.1; path=/p4/; httponly\r
+Set-Cookie: httpandsec=myvalue2  ; domain=127.0.0.1; path=/p4/; httponly; secure\r
+Set-Cookie: httpandsec2=myvalue3; domain=127.0.0.1; path=/p4/; httponly=; secure\r
+Set-Cookie: httpandsec3=myvalue4  ; domain=127.0.0.1; path=/p4/; httponly; secure=\r
+Set-Cookie: httpandsec4=myvalue5  ; domain=127.0.0.1; path=/p4/; httponly=; secure=\r
+Set-Cookie: httpandsec5=myvalue6  ; domain=127.0.0.1; path=/p4/; secure; httponly=\r
+Set-Cookie: httpandsec6=myvalue7  ; domain=127.0.0.1; path=/p4/; secure=; httponly=\r
+Set-Cookie: httpandsec7=myvalue8  ; domain=127.0.0.1; path=/p4/; secure; httponly\r
+Set-Cookie: httpandsec8=myvalue9; domain=127.0.0.1; path=/p4/; secure=; httponly\r
+Set-Cookie: partmatch=present; domain=127.0.0.1 ; path=/;\r
+Set-Cookie: eat=this; domain=moo.foo.moo;\r
+Set-Cookie: eat=this-too; domain=.foo.moo;\r
+Set-Cookie: nodomainnovalue\r
+Set-Cookie: nodomain=value; expires=Fri Feb 13 11:56:27 GMT 2037\r
+Set-Cookie: novalue; domain=reallysilly\r
+Set-Cookie: test=yes; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030\r
+Set-Cookie: test2=yes; domain=se; expires=Sat Feb 2 11:56:27 GMT 2030\r
+Set-Cookie: magic=yessir; path=/silly/; HttpOnly\r
+Set-Cookie: blexp=yesyes; domain=127.0.0.1; domain=127.0.0.1; expiry=totally bad;\r
+Set-Cookie: partialip=nono; domain=.0.0.1;\r
+Set-Cookie: withspaces=  yes  within and around    ;\r
+Set-Cookie: withspaces2 =before equals;\r
+Set-Cookie: prespace=  yes before;\r
+Set-Cookie: securewithspace=after    ; secure =\r
+%endif
 \r
 boo
 </data>
index 42bd8e13bcb7205cd1a0ca80d19b807e301d024d..566e1e512440bfd10753452dfd6b54acb97733dd 100644 (file)
@@ -26,7 +26,11 @@ body
 </data2>
 <datacheck>
 HTTP/1.1 302 OK swsclose\r
+%if !hyper
 Location: ../moo.html/?name=d a niel&testcase=/400002    \r
+%else
+Location: ../moo.html/?name=d a niel&testcase=/400002\r
+%endif
 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
 Connection: close\r
 \r
index abb3412eeed452186bee2600b71cec76e806ac57..cfb2eb3805534a89afec4046841e6358b20dbbd3 100644 (file)
@@ -26,7 +26,11 @@ body
 </data2>
 <datacheck>
 HTTP/1.1 302 OK swsclose\r
+%if !hyper
 Location: ../m o o.html/420002    \r
+%else
+Location: ../m o o.html/420002\r
+%endif
 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
 Connection: close\r
 \r
index 24f081954fdfb7adfcf54c509585b35fb5530c0a..3878d53dcfeea9b0c4d475170aebd5230ce48213 100644 (file)
@@ -11,7 +11,7 @@ followlocation
 <data>
 HTTP/1.1 302 This is a weirdo text message swsclose
 Connection: close
-Location:  
+Location: 
 
 This server reply is for testing
 </data>
index 394ac357477bb15d9c0fdba7571848fb63663afe..ee21c9d21783b78b6c6c416292db3a143a3f11d3 100644 (file)
@@ -52,7 +52,11 @@ Accept: */*
 Transfer-Encoding: chunked\r
 Content-Type: application/x-www-form-urlencoded\r
 \r
+%if hyper
+C\r
+%else
 c\r
+%endif
 we post this\r
 0\r
 \r
index 09cd54f8393bd16ca506a6dceb0e1480b18ba5c6..885ca731d55bd91bad78a63ba45c46a4024b7f85 100644 (file)
@@ -43,7 +43,9 @@ Host: %HOSTIP:%HTTPPORT
 User-Agent: curl/%VERSION\r
 Accept: */*\r
 Transfer-Encoding: chunked\r
+%if !hyper
 Content-Length: 1\r
+%endif
 Expect: 100-continue\r
 \r
 13\r