From 346dbbacb04c333294b51a7f8d9c06406a642063 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Wed, 14 Nov 2012 19:49:12 +0100 Subject: [PATCH 01/19] Do not mix CRLF and LF header endings in a couple of HTTP tests Consistently use CRLF instead. The mixed endings weren't documented so I assume they were unintentional. This change doesn't matter for curl itself but makes using the tests with a proxy between curl and the test server more convenient. Tests that consistently use no carriage returns were left unmodified as one can easily work around this. --- tests/data/test1011 | 20 ++++++++++---------- tests/data/test1012 | 20 ++++++++++---------- tests/data/test13 | 6 +++--- tests/data/test1325 | 20 ++++++++++---------- tests/data/test1413 | 20 ++++++++++---------- tests/data/test174 | 2 +- tests/data/test175 | 4 ++-- tests/data/test176 | 4 ++-- tests/data/test18 | 36 ++++++++++++++++++------------------ tests/data/test22 | 6 +++--- tests/data/test273 | 4 ++-- tests/data/test39 | 8 ++++---- tests/data/test40 | 20 ++++++++++---------- tests/data/test42 | 20 ++++++++++---------- tests/data/test46 | 22 +++++++++++----------- tests/data/test53 | 12 ++++++------ 16 files changed, 112 insertions(+), 112 deletions(-) diff --git a/tests/data/test1011 b/tests/data/test1011 index 59829c9..566867d 100644 --- a/tests/data/test1011 +++ b/tests/data/test1011 @@ -17,11 +17,11 @@ Content-Length: 0 -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose +Location: this should be ignored +Date: Thu, 09 Nov 2010 14:49:00 GMT +Connection: close + body @@ -30,11 +30,11 @@ Location: moo.html&testcase=/10110002 Date: Thu, 09 Nov 2010 14:49:00 GMT Content-Length: 0 -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose +Location: this should be ignored +Date: Thu, 09 Nov 2010 14:49:00 GMT +Connection: close + body diff --git a/tests/data/test1012 b/tests/data/test1012 index 6aa1715..4edc173 100644 --- a/tests/data/test1012 +++ b/tests/data/test1012 @@ -17,11 +17,11 @@ Connection: close -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose +Location: this should be ignored +Date: Thu, 09 Nov 2010 14:49:00 GMT +Connection: close + body @@ -30,11 +30,11 @@ Location: moo.html&testcase=/10120002 Date: Thu, 09 Nov 2010 14:49:00 GMT Connection: close -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose +Location: this should be ignored +Date: Thu, 09 Nov 2010 14:49:00 GMT +Connection: close + body diff --git a/tests/data/test13 b/tests/data/test13 index 8f997f0..18f7f81 100644 --- a/tests/data/test13 +++ b/tests/data/test13 @@ -8,10 +8,10 @@ HTTP custom request # Server-side -HTTP/1.1 200 Read you +HTTP/1.1 200 Read you Content-Length: 29 -Deleted: suppose we got a header like this! ;-) - +Deleted: suppose we got a header like this! ;-) + blabla custom request result diff --git a/tests/data/test1325 b/tests/data/test1325 index 7bb62ea..2b98d6a 100644 --- a/tests/data/test1325 +++ b/tests/data/test1325 @@ -19,11 +19,11 @@ Connection: close -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose +Location: this should be ignored +Date: Thu, 09 Nov 2010 14:49:00 GMT +Connection: close + body @@ -32,11 +32,11 @@ Location: 13250002 Date: Thu, 09 Nov 2010 14:49:00 GMT Connection: close -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose +Location: this should be ignored +Date: Thu, 09 Nov 2010 14:49:00 GMT +Connection: close + body diff --git a/tests/data/test1413 b/tests/data/test1413 index 5376281..6e889a8 100644 --- a/tests/data/test1413 +++ b/tests/data/test1413 @@ -17,11 +17,11 @@ Connection: close -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose +Location: this should be ignored +Date: Thu, 09 Nov 2010 14:49:00 GMT +Connection: close + body @@ -30,11 +30,11 @@ Location: moo.html/14130002#fragmentpart Date: Thu, 09 Nov 2010 14:49:00 GMT Connection: close -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose +Location: this should be ignored +Date: Thu, 09 Nov 2010 14:49:00 GMT +Connection: close + body diff --git a/tests/data/test174 b/tests/data/test174 index fc5ccc1..acb1436 100644 --- a/tests/data/test174 +++ b/tests/data/test174 @@ -6,7 +6,7 @@ HTTP/1.1 200 beng swsclose Server: Microsoft-IIS/6.0 Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth Content-Type: text/html; charset=iso-8859-1 -Content-Length: 26 +Content-Length: 26 This is not the real page diff --git a/tests/data/test175 b/tests/data/test175 index 2ee78d5..9e005f1 100644 --- a/tests/data/test175 +++ b/tests/data/test175 @@ -22,7 +22,7 @@ This is not the real page HTTP/1.1 200 moo swsclose Server: Microsoft-IIS/6.0 Content-Type: text/html; charset=iso-8859-1 -Content-Length: 16 +Content-Length: 16 content for you @@ -36,7 +36,7 @@ Content-Type: text/html; charset=iso-8859-1 HTTP/1.1 200 moo swsclose Server: Microsoft-IIS/6.0 Content-Type: text/html; charset=iso-8859-1 -Content-Length: 16 +Content-Length: 16 content for you diff --git a/tests/data/test176 b/tests/data/test176 index d3b220b..596b46d 100644 --- a/tests/data/test176 +++ b/tests/data/test176 @@ -15,7 +15,7 @@ Content-Type: text/html; charset=iso-8859-1 HTTP/1.1 200 moo swsclose Server: Microsoft-IIS/6.0 Content-Type: text/html; charset=iso-8859-1 -Content-Length: 16 +Content-Length: 16 content for you @@ -29,7 +29,7 @@ Content-Type: text/html; charset=iso-8859-1 HTTP/1.1 200 moo swsclose Server: Microsoft-IIS/6.0 Content-Type: text/html; charset=iso-8859-1 -Content-Length: 16 +Content-Length: 16 content for you diff --git a/tests/data/test18 b/tests/data/test18 index ff65817..43e3ab3 100644 --- a/tests/data/test18 +++ b/tests/data/test18 @@ -9,24 +9,24 @@ HTTP GET # Server-side -HTTP/1.1 200 OK -Funny-head: yesyes +HTTP/1.1 200 OK +Funny-head: yesyes Content-Length: 4 - + moo -HTTP/1.1 200 OK -Funny-head: yesyes +HTTP/1.1 200 OK +Funny-head: yesyes Content-Length: 4 - + foo -HTTP/1.1 200 OK -Funny-head: yesyes +HTTP/1.1 200 OK +Funny-head: yesyes Content-Length: 4 - + hoo @@ -68,22 +68,22 @@ Accept: */* --_curl_--%HOSTIP:%HTTPPORT/18 -HTTP/1.1 200 OK -Funny-head: yesyes +HTTP/1.1 200 OK +Funny-head: yesyes Content-Length: 4 - + moo --_curl_--%HOSTIP:%HTTPPORT/180002 -HTTP/1.1 200 OK -Funny-head: yesyes +HTTP/1.1 200 OK +Funny-head: yesyes Content-Length: 4 - + foo --_curl_--%HOSTIP:%HTTPPORT/180003 -HTTP/1.1 200 OK -Funny-head: yesyes +HTTP/1.1 200 OK +Funny-head: yesyes Content-Length: 4 - + hoo diff --git a/tests/data/test22 b/tests/data/test22 index 734379e..2e8bdec 100644 --- a/tests/data/test22 +++ b/tests/data/test22 @@ -9,10 +9,10 @@ long URL # Server-side -HTTP/1.1 200 OK -Funny-head: yesyes +HTTP/1.1 200 OK +Funny-head: yesyes Content-Length: 27 - + This is the proof it works diff --git a/tests/data/test273 b/tests/data/test273 index bb23725..dc52a10 100644 --- a/tests/data/test273 +++ b/tests/data/test273 @@ -12,7 +12,7 @@ HTTP Digest auth HTTP/1.1 401 Authorization Required swsclose Server: Apache/1.3.27 (Darwin) PHP/4.1.2 WWW-Authenticate: Digest realm="testrealm", nonce="1053604145" -WWW-Authenticate: Digest realm="testrealm", nonce="1053604145" +WWW-Authenticate: Digest realm="testrealm", nonce="1053604145" Content-Type: text/html; charset=iso-8859-1 This is not the real page @@ -33,7 +33,7 @@ This IS the real page! HTTP/1.1 401 Authorization Required swsclose Server: Apache/1.3.27 (Darwin) PHP/4.1.2 WWW-Authenticate: Digest realm="testrealm", nonce="1053604145" -WWW-Authenticate: Digest realm="testrealm", nonce="1053604145" +WWW-Authenticate: Digest realm="testrealm", nonce="1053604145" Content-Type: text/html; charset=iso-8859-1 HTTP/1.1 200 OK swsclose diff --git a/tests/data/test39 b/tests/data/test39 index 2c8da33..a2e1441 100644 --- a/tests/data/test39 +++ b/tests/data/test39 @@ -8,11 +8,11 @@ HTTP FORMPOST # Server-side -HTTP/1.1 200 OK -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake Content-Length: 10 - + blablabla diff --git a/tests/data/test40 b/tests/data/test40 index b56ff75..6be0d16 100644 --- a/tests/data/test40 +++ b/tests/data/test40 @@ -17,11 +17,11 @@ Connection: close -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose +Location: this should be ignored +Date: Thu, 09 Nov 2010 14:49:00 GMT +Connection: close + body @@ -30,11 +30,11 @@ Location: ../moo.html/?name=d a niel&testcase=/400002 Date: Thu, 09 Nov 2010 14:49:00 GMT Connection: close -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose +Location: this should be ignored +Date: Thu, 09 Nov 2010 14:49:00 GMT +Connection: close + body diff --git a/tests/data/test42 b/tests/data/test42 index ec67426..e303f3a 100644 --- a/tests/data/test42 +++ b/tests/data/test42 @@ -17,11 +17,11 @@ Connection: close -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose +Location: this should be ignored +Date: Thu, 09 Nov 2010 14:49:00 GMT +Connection: close + body @@ -30,11 +30,11 @@ Location: ../m o o.html/420002 Date: Thu, 09 Nov 2010 14:49:00 GMT Connection: close -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose +Location: this should be ignored +Date: Thu, 09 Nov 2010 14:49:00 GMT +Connection: close + body diff --git a/tests/data/test46 b/tests/data/test46 index 2f375fd..f73acde 100644 --- a/tests/data/test46 +++ b/tests/data/test46 @@ -11,18 +11,18 @@ cookiejar # Server-side -HTTP/1.1 200 OK -Server: Microsoft-IIS/4.0 -Date: Tue, 25 Sep 2001 19:37:44 GMT -Content-Type: text/html -Set-Cookie: ckyPersistent=permanent; expires=Fri, 02-Feb-2035 11:56:27 GMT; path=/ -Set-Cookie: ckySession=temporary; path=/ -Set-Cookie: ASPSESSIONIDQGGQQSJJ=GKNBDIFAAOFDPDAIEAKDIBKE; path=/ -Set-Cookie: justaname=; path=/; -Set-Cookie: simplyhuge=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz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zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz -Cache-control: private +HTTP/1.1 200 OK +Server: Microsoft-IIS/4.0 +Date: Tue, 25 Sep 2001 19:37:44 GMT +Content-Type: text/html +Set-Cookie: ckyPersistent=permanent; expires=Fri, 02-Feb-2035 11:56:27 GMT; path=/ +Set-Cookie: ckySession=temporary; path=/ +Set-Cookie: ASPSESSIONIDQGGQQSJJ=GKNBDIFAAOFDPDAIEAKDIBKE; path=/ +Set-Cookie: justaname=; path=/; +Set-Cookie: simplyhuge=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz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zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz +Cache-control: private Content-Length: 41 - + This server reply is for testing cookies diff --git a/tests/data/test53 b/tests/data/test53 index 0ced2d2..679a4fa 100644 --- a/tests/data/test53 +++ b/tests/data/test53 @@ -9,13 +9,13 @@ cookies # Server-side -HTTP/1.1 200 OK -Server: Microsoft-IIS/4.0 -Date: Tue, 25 Sep 2001 19:37:44 GMT -Content-Type: text/html -Connection: close +HTTP/1.1 200 OK +Server: Microsoft-IIS/4.0 +Date: Tue, 25 Sep 2001 19:37:44 GMT +Content-Type: text/html +Connection: close Content-Length: 21 - + This server says moo -- 1.8.0 From 799406811a08fde668ea4ec7a7514b8de0b8ef2f Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Fri, 16 Nov 2012 13:54:59 +0100 Subject: [PATCH 02/19] Use carriage returns in all headers in test 31 Trailing spaces were left unmodifed, assuming they were intentional. --- tests/data/test31 | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/data/test31 b/tests/data/test31 index fa871d0..ef05f7c 100644 --- a/tests/data/test31 +++ b/tests/data/test31 @@ -21,24 +21,24 @@ Set-Cookie:ismatch=this ; domain=127.0.0.1; path=/silly/ Set-Cookie: sec1value=secure1 ; domain=127.0.0.1; path=/secure1/ ; secure Set-Cookie: sec2value=secure2 ; domain=127.0.0.1; path=/secure2/ ; secure= Set-Cookie: sec3value=secure3 ; domain=127.0.0.1; path=/secure3/ ; secure= -Set-Cookie: sec4value=secure4 ; secure=; domain=127.0.0.1; path=/secure4/ ; -Set-Cookie: sec5value=secure5 ; secure; domain=127.0.0.1; path=/secure5/ ; -Set-Cookie: sec6value=secure6 ; secure ; domain=127.0.0.1; path=/secure6/ ; -Set-Cookie: sec7value=secure7 ; secure ; domain=127.0.0.1; path=/secure7/ ; -Set-Cookie: sec8value=secure8 ; secure= ; domain=127.0.0.1; path=/secure8/ ; -Set-Cookie: secure=very1 ; secure=; domain=127.0.0.1; path=/secure9/; -Set-Cookie: httpo1=value1 ; domain=127.0.0.1; path=/p1/; httponly -Set-Cookie: httpo2=value2 ; domain=127.0.0.1; path=/p2/; httponly= -Set-Cookie: httpo3=value3 ; httponly; domain=127.0.0.1; path=/p3/; -Set-Cookie: httpo4=value4 ; httponly=; domain=127.0.0.1; path=/p4/; -Set-Cookie: httponly=myvalue1 ; domain=127.0.0.1; path=/p4/; httponly -Set-Cookie: httpandsec=myvalue2 ; domain=127.0.0.1; path=/p4/; httponly; secure -Set-Cookie: httpandsec2=myvalue3; domain=127.0.0.1; path=/p4/; httponly=; secure -Set-Cookie: httpandsec3=myvalue4 ; domain=127.0.0.1; path=/p4/; httponly; secure= -Set-Cookie: httpandsec4=myvalue5 ; domain=127.0.0.1; path=/p4/; httponly=; secure= -Set-Cookie: httpandsec5=myvalue6 ; domain=127.0.0.1; path=/p4/; secure; httponly= -Set-Cookie: httpandsec6=myvalue7 ; domain=127.0.0.1; path=/p4/; secure=; httponly= -Set-Cookie: httpandsec7=myvalue8 ; domain=127.0.0.1; path=/p4/; secure; httponly +Set-Cookie: sec4value=secure4 ; secure=; domain=127.0.0.1; path=/secure4/ ; +Set-Cookie: sec5value=secure5 ; secure; domain=127.0.0.1; path=/secure5/ ; +Set-Cookie: sec6value=secure6 ; secure ; domain=127.0.0.1; path=/secure6/ ; +Set-Cookie: sec7value=secure7 ; secure ; domain=127.0.0.1; path=/secure7/ ; +Set-Cookie: sec8value=secure8 ; secure= ; domain=127.0.0.1; path=/secure8/ ; +Set-Cookie: secure=very1 ; secure=; domain=127.0.0.1; path=/secure9/; +Set-Cookie: httpo1=value1 ; domain=127.0.0.1; path=/p1/; httponly +Set-Cookie: httpo2=value2 ; domain=127.0.0.1; path=/p2/; httponly= +Set-Cookie: httpo3=value3 ; httponly; domain=127.0.0.1; path=/p3/; +Set-Cookie: httpo4=value4 ; httponly=; domain=127.0.0.1; path=/p4/; +Set-Cookie: httponly=myvalue1 ; domain=127.0.0.1; path=/p4/; httponly +Set-Cookie: httpandsec=myvalue2 ; domain=127.0.0.1; path=/p4/; httponly; secure +Set-Cookie: httpandsec2=myvalue3; domain=127.0.0.1; path=/p4/; httponly=; secure +Set-Cookie: httpandsec3=myvalue4 ; domain=127.0.0.1; path=/p4/; httponly; secure= +Set-Cookie: httpandsec4=myvalue5 ; domain=127.0.0.1; path=/p4/; httponly=; secure= +Set-Cookie: httpandsec5=myvalue6 ; domain=127.0.0.1; path=/p4/; secure; httponly= +Set-Cookie: httpandsec6=myvalue7 ; domain=127.0.0.1; path=/p4/; secure=; httponly= +Set-Cookie: httpandsec7=myvalue8 ; domain=127.0.0.1; path=/p4/; secure; httponly Set-Cookie: httpandsec8=myvalue9; domain=127.0.0.1; path=/p4/; secure=; httponly Set-Cookie: partmatch=present; domain=127.0.0.1 ; path=/; Set-Cookie:eat=this; domain=moo.foo.moo; @@ -49,7 +49,7 @@ Set-Cookie: novalue; domain=reallysilly Set-Cookie: test=yes; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030 Set-Cookie: test2=yes; domain=se; expires=Sat Feb 2 11:56:27 GMT 2030 Set-Cookie: magic=yessir; path=/silly/; HttpOnly -Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad; +Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad; boo -- 1.8.0 From 3a81e57ba8e9f037dfbcff8a25e6a7946bc11120 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Tue, 13 Nov 2012 14:02:42 +0100 Subject: [PATCH 03/19] Add keywords for a couple of currently keyword-less HTTP tests --- tests/data/test155 | 7 +++++++ tests/data/test158 | 7 +++++++ tests/data/test174 | 7 +++++++ tests/data/test176 | 7 +++++++ tests/data/test197 | 6 ++++++ tests/data/test198 | 6 ++++++ tests/data/test199 | 6 ++++++ tests/data/test207 | 6 ++++++ tests/data/test214 | 6 ++++++ tests/data/test218 | 6 ++++++ tests/data/test249 | 6 ++++++ 11 files changed, 70 insertions(+) diff --git a/tests/data/test155 b/tests/data/test155 index 891aa35..70ac7fd 100644 --- a/tests/data/test155 +++ b/tests/data/test155 @@ -1,4 +1,11 @@ + + +HTTP +HTTP PUT + + + # Server-side diff --git a/tests/data/test158 b/tests/data/test158 index 417238d..5cbc97a 100644 --- a/tests/data/test158 +++ b/tests/data/test158 @@ -1,4 +1,11 @@ + + +HTTP +HTTP POST + + + # Server-side diff --git a/tests/data/test174 b/tests/data/test174 index acb1436..9767f2f 100644 --- a/tests/data/test174 +++ b/tests/data/test174 @@ -1,4 +1,11 @@ + + +HTTP +HTTP POST + + + # Server-side diff --git a/tests/data/test176 b/tests/data/test176 index 596b46d..413c149 100644 --- a/tests/data/test176 +++ b/tests/data/test176 @@ -1,4 +1,11 @@ + + +HTTP +HTTP POST + + + # Server-side # the first request has NTLM type-1 included, and then the 1001 is returned diff --git a/tests/data/test197 b/tests/data/test197 index 062f469..c299a22 100644 --- a/tests/data/test197 +++ b/tests/data/test197 @@ -1,4 +1,10 @@ + + +HTTP +HTTP GET + + # # Server-side diff --git a/tests/data/test198 b/tests/data/test198 index bb451b5..dca26b9 100644 --- a/tests/data/test198 +++ b/tests/data/test198 @@ -1,4 +1,10 @@ + + +HTTP +HTTP GET + + # # Server-side diff --git a/tests/data/test199 b/tests/data/test199 index c9651bc..e8df66e 100644 --- a/tests/data/test199 +++ b/tests/data/test199 @@ -1,4 +1,10 @@ + + +HTTP +HTTP GET + + # # Server-side diff --git a/tests/data/test207 b/tests/data/test207 index c2eff63..85f9af6 100644 --- a/tests/data/test207 +++ b/tests/data/test207 @@ -1,4 +1,10 @@ + + +HTTP +HTTP GET + + # # Server-side diff --git a/tests/data/test214 b/tests/data/test214 index e12dfbf..a9b8fcd 100644 --- a/tests/data/test214 +++ b/tests/data/test214 @@ -1,4 +1,10 @@ + + +HTTP +HTTP GET + + # # Server-side diff --git a/tests/data/test218 b/tests/data/test218 index dc146fc..c201e77 100644 --- a/tests/data/test218 +++ b/tests/data/test218 @@ -1,4 +1,10 @@ + + +HTTP +HTTP PUT + + # # Server-side diff --git a/tests/data/test249 b/tests/data/test249 index 69df5be..4f99c2a 100644 --- a/tests/data/test249 +++ b/tests/data/test249 @@ -1,4 +1,10 @@ + + +HTTP +HTTP GET + + # # Server-side -- 1.8.0 From d15c073940b330239b4306ee9ecaa6551e4b1590 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Fri, 16 Nov 2012 12:42:51 +0100 Subject: [PATCH 04/19] Add FTP keywords for a couple of currently keyword-less FTP tests --- tests/data/test147 | 6 ++++++ tests/data/test148 | 6 ++++++ tests/data/test149 | 6 ++++++ tests/data/test182 | 6 ++++++ tests/data/test190 | 6 ++++++ tests/data/test191 | 6 ++++++ tests/data/test195 | 6 ++++++ tests/data/test196 | 6 ++++++ tests/data/test210 | 6 ++++++ tests/data/test211 | 6 ++++++ tests/data/test212 | 6 ++++++ tests/data/test215 | 6 ++++++ tests/data/test216 | 6 ++++++ tests/data/test235 | 6 ++++++ tests/data/test236 | 5 +++++ tests/data/test237 | 6 ++++++ tests/data/test238 | 6 ++++++ tests/data/test247 | 6 ++++++ tests/data/test248 | 6 ++++++ tests/data/test250 | 6 ++++++ tests/data/test251 | 6 ++++++ 21 files changed, 125 insertions(+) diff --git a/tests/data/test147 b/tests/data/test147 index aaa4ca1..6651df0 100644 --- a/tests/data/test147 +++ b/tests/data/test147 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side diff --git a/tests/data/test148 b/tests/data/test148 index de0fa7a..fbac10f 100644 --- a/tests/data/test148 +++ b/tests/data/test148 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side diff --git a/tests/data/test149 b/tests/data/test149 index f7973f4..a5d1499 100644 --- a/tests/data/test149 +++ b/tests/data/test149 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side diff --git a/tests/data/test182 b/tests/data/test182 index 272cdee..f640a0e 100644 --- a/tests/data/test182 +++ b/tests/data/test182 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side diff --git a/tests/data/test190 b/tests/data/test190 index 4789cfa..6f5d66a 100644 --- a/tests/data/test190 +++ b/tests/data/test190 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side diff --git a/tests/data/test191 b/tests/data/test191 index 2c56cc8..86fa29f 100644 --- a/tests/data/test191 +++ b/tests/data/test191 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side diff --git a/tests/data/test195 b/tests/data/test195 index 788c89a..3059e8d 100644 --- a/tests/data/test195 +++ b/tests/data/test195 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side diff --git a/tests/data/test196 b/tests/data/test196 index b070f38..ee9d339 100644 --- a/tests/data/test196 +++ b/tests/data/test196 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side diff --git a/tests/data/test210 b/tests/data/test210 index 83c9b3e..e904567 100644 --- a/tests/data/test210 +++ b/tests/data/test210 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side diff --git a/tests/data/test211 b/tests/data/test211 index 0214eff..96d0573 100644 --- a/tests/data/test211 +++ b/tests/data/test211 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side diff --git a/tests/data/test212 b/tests/data/test212 index 8a10abf..8daed55 100644 --- a/tests/data/test212 +++ b/tests/data/test212 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side diff --git a/tests/data/test215 b/tests/data/test215 index 5005817..8770efb 100644 --- a/tests/data/test215 +++ b/tests/data/test215 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side # When doing LIST, we get the default list output hard-coded in the test diff --git a/tests/data/test216 b/tests/data/test216 index a8264ce..0c4de0a 100644 --- a/tests/data/test216 +++ b/tests/data/test216 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side diff --git a/tests/data/test235 b/tests/data/test235 index ee843f1..6250232 100644 --- a/tests/data/test235 +++ b/tests/data/test235 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side diff --git a/tests/data/test236 b/tests/data/test236 index 20d0470..9ba706f 100644 --- a/tests/data/test236 +++ b/tests/data/test236 @@ -1,4 +1,9 @@ + + +FTP + + # Server-side diff --git a/tests/data/test237 b/tests/data/test237 index 9675a1e..9a40f1f 100644 --- a/tests/data/test237 +++ b/tests/data/test237 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side diff --git a/tests/data/test238 b/tests/data/test238 index 6397e3b..56f21eb 100644 --- a/tests/data/test238 +++ b/tests/data/test238 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side diff --git a/tests/data/test247 b/tests/data/test247 index 66c674e..2720144 100644 --- a/tests/data/test247 +++ b/tests/data/test247 @@ -1,4 +1,10 @@ + + +FTP + + + 213 20030409102659 diff --git a/tests/data/test248 b/tests/data/test248 index 814b1d7..d254a95 100644 --- a/tests/data/test248 +++ b/tests/data/test248 @@ -1,4 +1,10 @@ + + +FTP + + + 213 20050409102659 diff --git a/tests/data/test250 b/tests/data/test250 index 2c99c46..aeed134 100644 --- a/tests/data/test250 +++ b/tests/data/test250 @@ -1,4 +1,10 @@ + + +FTP + + + # # Server-side diff --git a/tests/data/test251 b/tests/data/test251 index 73ee09e..d50e1b3 100644 --- a/tests/data/test251 +++ b/tests/data/test251 @@ -1,4 +1,10 @@ + + +FTP + + + # Server-side # When doing LIST, we get the default list output hard-coded in the test -- 1.8.0 From cc5d34bc558fdcf47990efe8349deace944b8fde Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Wed, 14 Nov 2012 19:44:11 +0100 Subject: [PATCH 05/19] Add --resolve to the keywords and name of test 1318 This makes it easier to skip it automatically when the test suite is used with external proxies. --- tests/data/test1318 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/data/test1318 b/tests/data/test1318 index 709e08d..dc182dc 100644 --- a/tests/data/test1318 +++ b/tests/data/test1318 @@ -3,6 +3,7 @@ HTTP HTTP GET +--resolve @@ -32,7 +33,7 @@ Content-Length: 0 http -HTTP with same host name using different cases +HTTP with --resolve and same host name using different cases --resolve MiXeDcAsE.cOm:%HTTPPORT:%HOSTIP http://MiXeDcAsE.cOm:%HTTPPORT/1318 http://mixedcase.com:%HTTPPORT/13180001 -- 1.8.0 From 76270d654b9b5426c23a3df8c2944f5a6b8d5ddb Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Thu, 15 Nov 2012 14:02:21 +0100 Subject: [PATCH 06/19] Let test 8 work as long as %HOSTIP ends with ".0.0.1" .. and add a precheck to skip the test otherwise. --- tests/data/test8 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/data/test8 b/tests/data/test8 index 4a6e004..c36408a 100644 --- a/tests/data/test8 +++ b/tests/data/test8 @@ -35,8 +35,8 @@ Date: Thu, 09 Nov 2010 14:49:00 GMT Server: test-server/fake Content-Type: text/html Funny-head: yesyes -Set-Cookie: foobar=name; domain=127.0.0.1; path=/; -Set-Cookie: mismatch=this; domain=127.0.0.1; path="/silly/"; +Set-Cookie: foobar=name; domain=%HOSTIP; path=/; +Set-Cookie: mismatch=this; domain=%HOSTIP; path="/silly/"; Set-Cookie: partmatch=present; domain=.0.0.1; path=/w; Set-Cookie: duplicate=test; domain=.0.0.1; domain=.0.0.1; path=/donkey; Set-Cookie: cookie=yes; path=/we; @@ -45,6 +45,9 @@ Set-Cookie: nocookie=yes; path=/WE; Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad; + +perl -e 'if ("%HOSTIP" !~ /\.0\.0\.1$/) {print "Test only works for HOSTIPs ending with .0.0.1"; exit(1)}' + # Verify data after the test has been "shot" -- 1.8.0 From 709a0a553e6fd0e897671ecf88b4c9406234e795 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 18 Nov 2012 14:55:29 +0100 Subject: [PATCH 07/19] Add a HOSTIP precheck for tests 31 and 1105 They currently only work for 127.0.0.1 which is hardcoded and can't be easily changed. --- tests/data/test1105 | 3 +++ tests/data/test31 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/data/test1105 b/tests/data/test1105 index 1b2bf56..922346f 100644 --- a/tests/data/test1105 +++ b/tests/data/test1105 @@ -34,6 +34,9 @@ HTTP with cookie parser and header recording "http://%HOSTIP:%HTTPPORT/we/want/1105?parm1=this*that/other/thing&parm2=foobar/1105" -c log/cookie1105.txt -d "userid=myname&password=mypassword" + +perl -e 'if ("%HOSTIP" !~ /127\.0\.0\.1$/) {print "Test only works for HOSTIP 127.0.0.1"; exit(1)}' + # Verify data after the test has been "shot" diff --git a/tests/data/test31 b/tests/data/test31 index ef05f7c..b1171d8 100644 --- a/tests/data/test31 +++ b/tests/data/test31 @@ -72,6 +72,9 @@ TZ=GMT http://%HOSTIP:%HTTPPORT/we/want/31 -b none -c log/jar31.txt + +perl -e 'if ("%HOSTIP" !~ /127\.0\.0\.1$/) {print "Test only works for HOSTIP 127.0.0.1"; exit(1)}' + # Verify data after the test has been "shot" -- 1.8.0 From ebaacfe2567b847111509370f7d01b9949649afe Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Tue, 13 Nov 2012 13:58:14 +0100 Subject: [PATCH 08/19] Test 92 and 194: normalize spaces in the Server headers It makes no difference from curl's point of view but makes it more convenient to use the tests with a lws-normalizing proxy between curl and the test server. --- tests/data/test194 | 2 +- tests/data/test92 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/data/test194 b/tests/data/test194 index 582f197..1010ee9 100644 --- a/tests/data/test194 +++ b/tests/data/test194 @@ -13,7 +13,7 @@ Resume HTTP/1.1 416 Requested Range Not Satisfiable swsclose Date: Fri, 24 Oct 2003 21:33:12 GMT -Server: Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1 +Server: Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1 Last-Modified: Fri, 24 Oct 2003 18:01:23 GMT ETag: "ab57a-507-3f9968f3" Accept-Ranges: bytes diff --git a/tests/data/test92 b/tests/data/test92 index 726aa79..bf78276 100644 --- a/tests/data/test92 +++ b/tests/data/test92 @@ -13,7 +13,7 @@ Resume HTTP/1.1 416 Requested Range Not Satisfiable Date: Fri, 24 Oct 2003 21:33:12 GMT -Server: Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1 +Server: Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1 Last-Modified: Fri, 24 Oct 2003 18:01:23 GMT ETag: "ab57a-507-3f9968f3" Accept-Ranges: bytes -- 1.8.0 From 6deade9107d3e5502c41b04337a548c91738f450 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Wed, 14 Nov 2012 12:53:47 +0100 Subject: [PATCH 09/19] Fix comment typos in test 517 --- tests/data/test517 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/data/test517 b/tests/data/test517 index 48d8122..7b703b4 100644 --- a/tests/data/test517 +++ b/tests/data/test517 @@ -112,10 +112,10 @@ nothing 83: Wed, 31 Dec 2008 23:59:60 GMT => 1230768000 -# This test case previously testes an overflow case ("2094 Nov 6 => +# This test case previously tested an overflow case ("2094 Nov 6 => # 2147483647") for 32bit time_t, but since some systems have 64bit time_t and # handles this (returning 3939840000), and some 64bit-time_t systems don't -# handle this and returns -1 for this, it turned very tricky to write a fine +# handle this and return -1 for this, it turned very tricky to write a fine # test case and thus it is now removed until we have a way to write test cases # for this kind of things. -- 1.8.0 From 64b2116b226440835f42acaecfc90cbfca0437eb Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Wed, 14 Nov 2012 11:40:31 +0100 Subject: [PATCH 10/19] runtests and friends: Do not add undefined values to @INC On FreeBSD this fixes the warning: Use of uninitialized value $p in string eq at /usr/local/lib/perl5/5.14.2/BSDPAN/BSDPAN.pm line 36. --- tests/ftpserver.pl | 3 ++- tests/httpserver.pl | 3 ++- tests/keywords.pl | 3 ++- tests/rtspserver.pl | 3 ++- tests/runtests.pl | 3 ++- tests/secureserver.pl | 3 ++- tests/tftpserver.pl | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl index 6e6f691..45b3436 100755 --- a/tests/ftpserver.pl +++ b/tests/ftpserver.pl @@ -39,7 +39,8 @@ # BEGIN { - @INC=(@INC, $ENV{'srcdir'}, '.'); + push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'}); + push(@INC, "."); # sub second timestamping needs Time::HiRes eval { no warnings "all"; diff --git a/tests/httpserver.pl b/tests/httpserver.pl index d5c4dfb..a38c3ce 100755 --- a/tests/httpserver.pl +++ b/tests/httpserver.pl @@ -22,7 +22,8 @@ #*************************************************************************** BEGIN { - @INC=(@INC, $ENV{'srcdir'}, '.'); + push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'}); + push(@INC, "."); } use strict; diff --git a/tests/keywords.pl b/tests/keywords.pl index 523bde1..28646ad 100755 --- a/tests/keywords.pl +++ b/tests/keywords.pl @@ -23,7 +23,8 @@ use strict; -@INC=(@INC, $ENV{'srcdir'}, "."); +push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'}); +push(@INC, "."); require "getpart.pm"; # array functions diff --git a/tests/rtspserver.pl b/tests/rtspserver.pl index 515128d..07a588e 100755 --- a/tests/rtspserver.pl +++ b/tests/rtspserver.pl @@ -22,7 +22,8 @@ #*************************************************************************** BEGIN { - @INC=(@INC, $ENV{'srcdir'}, '.'); + push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'}); + push(@INC, "."); } use strict; diff --git a/tests/runtests.pl b/tests/runtests.pl index e263788..7ee0a65 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -56,7 +56,8 @@ # These should be the only variables that might be needed to get edited: BEGIN { - @INC=(@INC, $ENV{'srcdir'}, "."); + push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'}); + push(@INC, "."); # run time statistics needs Time::HiRes eval { no warnings "all"; diff --git a/tests/secureserver.pl b/tests/secureserver.pl index 064fa84..36a902e 100755 --- a/tests/secureserver.pl +++ b/tests/secureserver.pl @@ -26,7 +26,8 @@ # non-secure test harness servers. BEGIN { - @INC=(@INC, $ENV{'srcdir'}, '.'); + push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'}); + push(@INC, "."); } use strict; diff --git a/tests/tftpserver.pl b/tests/tftpserver.pl index c5382ec..60fc32d 100755 --- a/tests/tftpserver.pl +++ b/tests/tftpserver.pl @@ -22,7 +22,8 @@ #*************************************************************************** BEGIN { - @INC=(@INC, $ENV{'srcdir'}, '.'); + push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'}); + push(@INC, "."); } use strict; -- 1.8.0 From 696b1a709bbe16ee8d5872e3a579e2d9b57e8de6 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Thu, 15 Nov 2012 15:57:29 +0100 Subject: [PATCH 11/19] runtests.pl: Show the summarized test result in the last line of the report It makes it easier to find if there are lots of restraints. --- tests/runtests.pl | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/runtests.pl b/tests/runtests.pl index 7ee0a65..fedc6b0 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -4714,18 +4714,6 @@ my $all = $total + $skipped; runtimestats($lasttest); -if($total) { - logmsg sprintf("TESTDONE: $ok tests out of $total reported OK: %d%%\n", - $ok/$total*100); - - if($ok != $total) { - logmsg "TESTFAIL: These test cases failed: $failed\n"; - } -} -else { - logmsg "TESTFAIL: No tests were performed\n"; -} - if($all) { logmsg "TESTDONE: $all tests were considered during ". sprintf("%.0f", $sofar) ." seconds.\n"; @@ -4760,6 +4748,18 @@ if($skipped && !$short) { } } +if($total) { + logmsg sprintf("TESTDONE: $ok tests out of $total reported OK: %d%%\n", + $ok/$total*100); + + if($ok != $total) { + logmsg "TESTFAIL: These test cases failed: $failed\n"; + } +} +else { + logmsg "TESTFAIL: No tests were performed\n"; +} + if($total && ($ok != $total)) { exit 1; } -- 1.8.0 From a05ef14b12cd6215a65176d60144b6a8b59879c6 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 17 Nov 2012 20:54:48 +0100 Subject: [PATCH 12/19] runtests.pl: Do not use $_ after mapping it to a named variable Doing that makes the code harder to follow. --- tests/runtests.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/runtests.pl b/tests/runtests.pl index fedc6b0..c6f0737 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -4725,7 +4725,7 @@ if($skipped && !$short) { for(keys %skipped) { my $r = $_; - printf "TESTINFO: \"%s\" %d times (", $r, $skipped{$_}; + printf "TESTINFO: \"%s\" %d times (", $r, $skipped{$r}; # now show all test case numbers that had this reason for being # skipped @@ -4733,10 +4733,10 @@ if($skipped && !$short) { my $max = 9; for(0 .. scalar @teststat) { my $t = $_; - if($teststat[$_] && ($teststat[$_] eq $r)) { + if($teststat[$t] && ($teststat[$t] eq $r)) { if($c < $max) { logmsg ", " if($c); - logmsg $_; + logmsg $t; } $c++; } -- 1.8.0 From abf067b5e94f881a8e2a2e04344f825b0f0a33d4 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 17 Nov 2012 21:13:37 +0100 Subject: [PATCH 13/19] runtests.pl: Log the restraints sorted by the number of their occurrences --- tests/runtests.pl | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/tests/runtests.pl b/tests/runtests.pl index c6f0737..51fb2d7 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -4721,13 +4721,17 @@ if($all) { if($skipped && !$short) { my $s=0; + # Temporary hash to print the restraints sorted by the number + # of their occurences + my %restraints; logmsg "TESTINFO: $skipped tests were skipped due to these restraints:\n"; for(keys %skipped) { my $r = $_; - printf "TESTINFO: \"%s\" %d times (", $r, $skipped{$r}; + my $skip_count = $skipped{$r}; + my $log_line = sprintf("TESTINFO: \"%s\" %d times (", $r, $skip_count); - # now show all test case numbers that had this reason for being + # now gather all test case numbers that had this reason for being # skipped my $c=0; my $max = 9; @@ -4735,16 +4739,20 @@ if($skipped && !$short) { my $t = $_; if($teststat[$t] && ($teststat[$t] eq $r)) { if($c < $max) { - logmsg ", " if($c); - logmsg $t; + $log_line .= ", " if($c); + $log_line .= $t; } $c++; } } if($c > $max) { - logmsg " and ".($c-$max)." more"; + $log_line .= " and ".($c-$max)." more"; } - logmsg ")\n"; + $log_line .= ")\n"; + $restraints{$log_line} = $skip_count; + } + foreach my $log_line (sort {$restraints{$b} <=> $restraints{$a}} keys %restraints) { + logmsg $log_line; } } -- 1.8.0 From c132a4853ae316e7da70ca9daf03c19fdd8b8bda Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 17 Nov 2012 21:25:47 +0100 Subject: [PATCH 14/19] runtests.pl: Fix language when logging restraints that only occured once --- tests/runtests.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/runtests.pl b/tests/runtests.pl index 51fb2d7..7a8fd87 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -4729,7 +4729,8 @@ if($skipped && !$short) { for(keys %skipped) { my $r = $_; my $skip_count = $skipped{$r}; - my $log_line = sprintf("TESTINFO: \"%s\" %d times (", $r, $skip_count); + my $log_line = sprintf("TESTINFO: \"%s\" %d time%s (", $r, $skip_count, + ($skip_count == 1) ? "" : "s"); # now gather all test case numbers that had this reason for being # skipped -- 1.8.0 From f4c3b6ddfeaf014e3aa76f69a52c35fa67e5bc95 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 29 Aug 2010 14:12:30 +0200 Subject: [PATCH 15/19] runtests.pl: Add a -P option to specify an external proxy ... that should be used when executing the tests. This doesn't work for all test types yet. The assumption is that the proxy is an HTTP proxy and the mode enables a couple of "tricks" to reduce false positives: - Set a User-Agent that allows the proxy to detect that the request is part of a curl test (only works for tool=curl). - Filter out "Proxy-Connection:" headers when checking for test success. - Deal with tests that don't expect CRLF header endings as long as the test uses it consistently. - Reduce spaces in headers with a too-simplistic heuristic that happens to work for the existing tests. --- tests/runtests.pl | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/tests/runtests.pl b/tests/runtests.pl index 7a8fd87..8f73159 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -114,6 +114,9 @@ my $HOST6IP="[::1]"; # address on which the test server listens my $CLIENTIP="127.0.0.1"; # address which curl uses for incoming connections my $CLIENT6IP="[::1]"; # address which curl uses for incoming connections +my $use_external_proxy = 0; +my $proxy_address; + my $base = 8990; # base port number my $HTTPPORT; # HTTP server port @@ -716,6 +719,9 @@ sub verifyhttp { $flags .= "-1 " if($has_axtls); $flags .= "--insecure " if($proto eq 'https'); $flags .= "\"$proto://$ip:$port/${bonus}verifiedserver\""; + if($use_external_proxy) { + $flags .= " --proxy $proxy_address -H 'User-Agent: curl regression tests'"; + } my $cmd = "$VCURL $flags 2>$verifylog"; @@ -2143,6 +2149,12 @@ sub filteroff { return 0; } +sub print_skipped_header ($) { + my $skipped_header = shift; + $skipped_header =~ s@\r?\n$@@; + print "Skipping '$skipped_header'\n"; +} + ####################################################################### # compare test results with the expected output, we might filter off # some pattern that is allowed to differ, output test results @@ -2151,11 +2163,62 @@ sub compare { # filter off patterns _before_ this comparison! my ($subject, $firstref, $secondref)=@_; + if ($use_external_proxy) { + my @tmp; + my $crlf_expected = 0; + my $connection_header_expected = 0; + my $parsing_headers = 0; + + foreach (@$secondref) { + if (/^HTTP/) { + $parsing_headers = 1; + } + if (/^\r?\n$/) { + $parsing_headers = 0; + } + if (/\r\n$/) { + $crlf_expected = 1; # XXX: assume the expectancy is consistant. + } + if (/^Connection:/) { + $connection_header_expected = 1; + } + if (/^Connection:/) { + $connection_header_expected = 1; + } + if ($parsing_headers) { + # This is probably a header, normalize spaces + # similar to the way Privoxy does. This is required + # for tests 29, 40, 42 and 54. + # XXX: this is a hack + next if /"/; + s@ +@ @g; + } + } + + if($verbose) { + print "Expecting " . ($crlf_expected ? "" : "no ") . "crlf\n"; + print "Expecting " . ($connection_header_expected ? "a" : "no") . " Connection: header\n"; + } + foreach (@$firstref) { + s@\r\n$@\n@ unless ($crlf_expected); + if (m/^Proxy-Connection: keep-alive/ or m/^User-Agent: curl regression tests/) { + print_skipped_header($_) if($verbose); + next; + } + if (m/^Connection:/ and not $connection_header_expected) { + print_skipped_header($_) if($verbose); + next; + } + push @tmp, $_; + } + $firstref = \@tmp; + } + my $result = compareparts($firstref, $secondref); if($result) { if(!$short) { - logmsg "\n $subject FAILED:\n"; + logmsg "\n $subject FAILED. FUCK:\n"; logmsg showdiff($LOGDIR, $firstref, $secondref); } else { @@ -2821,6 +2884,10 @@ sub singletest { } } } + if($use_external_proxy) { + $ENV{http_proxy} = $proxy_address; + $ENV{HTTPS_PROXY} = $proxy_address; + } if(!$why) { # TODO: @@ -3031,6 +3098,9 @@ sub singletest { } $cmdargs ="$out $inc--trace-ascii log/trace$testnum --trace-time $cmd"; + if ($use_external_proxy) { + $cmdargs .= " --proxy $proxy_address -H 'User-Agent: curl regression tests'"; + } } else { $cmdargs = " $cmd"; # $cmd is the command line for the test file @@ -4307,6 +4377,11 @@ while(@ARGV) { elsif($ARGV[0] eq "-p") { $postmortem=1; } + elsif($ARGV[0] eq "-P") { + shift @ARGV; + $use_external_proxy=1; + $proxy_address=$ARGV[0]; + } elsif($ARGV[0] eq "-l") { # lists the test case names only $listonly=1; @@ -4358,6 +4433,7 @@ Usage: runtests.pl [options] [test selection(s)] -l list all test case names/descriptions -n no valgrind -p print log file contents when a test fails + -P proxy use the specified proxy -r run time statistics -rf full run time statistics -s short output -- 1.8.0 From 8d86a5de23ee8171810918de0708673401b23e90 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 17 Nov 2012 11:42:52 +0100 Subject: [PATCH 16/19] runtests.pl: Add the -H option to specify a non-default IPv4 host IP address This is useful when testing external proxies with the -P option. --- tests/runtests.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/runtests.pl b/tests/runtests.pl index 8f73159..6cdbf30 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -4351,6 +4351,10 @@ while(@ARGV) { $gdbthis=1; $gdbxwin=1; } + elsif ($ARGV[0] eq "-H") { + shift @ARGV; + $HOSTIP=$ARGV[0]; + } elsif($ARGV[0] eq "-s") { # short output $short=1; @@ -4429,6 +4433,7 @@ Usage: runtests.pl [options] [test selection(s)] -g run the test case with gdb -gw run the test case with gdb as a windowed application -h this help text + -H addr use the specified IPv4 host IP address instead of the default -k keep stdout and stderr files present after tests -l list all test case names/descriptions -n no valgrind -- 1.8.0 From e63b844c2c754b6a114bbf8753278c61f445ca44 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 17 Nov 2012 12:12:42 +0100 Subject: [PATCH 17/19] runtests.pl: Add an -m option to specify a "test manifest" file It's supposed to change runtests.pl's behaviour in various ways but at the moment it can only contain restraints for test numbers, keywords and tools. The syntax should be changed to be extendable and maybe more closely reflect the "curl test" syntax. Currently it's a bunch of lines like these: test:$TESTNUMBER:Reason why this test with number $TESTNUMBER should be skipped keyword:$KEYWORD:Reason why tests whose keywords contain the $KEYWORD should be skipped tool:$TOOL:Reason why tests with tools that contain $TOOL should be skipped The idea is to let third parties like the Privoxy project distribute a manifest file with their tarballs that specifies which curl tests are expected to work, without having to fork the whole curl test suite. It would make sense to let the manifest specify additional (project-specific) tests directories and provide additional command line arguments for runtests.pl. --- tests/runtests.pl | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/tests/runtests.pl b/tests/runtests.pl index 6cdbf30..69576cf 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -116,6 +116,7 @@ my $CLIENT6IP="[::1]"; # address which curl uses for incoming connections my $use_external_proxy = 0; my $proxy_address; +my %custom_skip_reasons; my $base = 8990; # base port number @@ -2827,6 +2828,31 @@ sub singletest { } } + if (!$why && defined $custom_skip_reasons{test}{$testnum}) { + $why = $custom_skip_reasons{test}{$testnum}; + } + + if (!$why && defined $custom_skip_reasons{tool}) { + foreach my $tool (getpart("client", "tool")) { + foreach my $tool_skip_pattern (keys $custom_skip_reasons{tool}) { + if ($tool =~ /$tool_skip_pattern/i) { + $why = $custom_skip_reasons{tool}{$tool_skip_pattern}; + } + } + } + } + + if (!$why && defined $custom_skip_reasons{keyword}) { + foreach my $keyword (getpart("info", "keywords")) { + foreach my $keyword_skip_pattern (keys $custom_skip_reasons{keyword}) { + if ($keyword =~ /$keyword_skip_pattern/i) { + $why = $custom_skip_reasons{keyword}{$keyword_skip_pattern}; + } + } + } + } + + # test definition may instruct to (un)set environment vars # this is done this early, so that the precheck can use environment # variables and still bail out fine on errors @@ -4386,6 +4412,24 @@ while(@ARGV) { $use_external_proxy=1; $proxy_address=$ARGV[0]; } + elsif($ARGV[0] eq "-m") { + shift @ARGV; + my $manifest = $ARGV[0]; + open(my $fd, "<", $manifest) or die "Couldn't open '$manifest': $!"; + while (my $line = <$fd>) { + next if ($line =~ /^#/); + chomp $line; + my ($type, $pattern, $skip_reason) = split(/\s*:\s*/, $line, 3); + + die "Unsupported type: $type\n" if($type !~ /^keyword|test|tool$/); + if ($type =~ /^test$/) { + # Strip leading zeros in the test number + $pattern = int($pattern); + } + $custom_skip_reasons{$type}{$pattern} = $skip_reason; + } + close($fd); + } elsif($ARGV[0] eq "-l") { # lists the test case names only $listonly=1; @@ -4436,6 +4480,7 @@ Usage: runtests.pl [options] [test selection(s)] -H addr use the specified IPv4 host IP address instead of the default -k keep stdout and stderr files present after tests -l list all test case names/descriptions + -m file load the specifed test manifest to decide which tests get executed -n no valgrind -p print log file contents when a test fails -P proxy use the specified proxy -- 1.8.0 From 55ff668b14c44417cd57a26fc7d8ac6294c47433 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Fri, 16 Nov 2012 22:32:31 +0100 Subject: [PATCH 18/19] runtests.pl: Disable valgrind for now. DO NOT UPSTREAM. --- tests/runtests.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/runtests.pl b/tests/runtests.pl index 69576cf..6e92f68 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -195,7 +195,7 @@ my $start; my $ftpchecktime=1; # time it took to verify our test FTP server my $stunnel = checkcmd("stunnel4") || checkcmd("stunnel"); -my $valgrind = checktestcmd("valgrind"); +my $valgrind = undef;#checktestcmd("valgrind"); my $valgrind_logfile="--logfile"; my $valgrind_tool; my $gdb = checktestcmd("gdb"); -- 1.8.0 From 3f91319cefca7e595a33e136ee55be6f467bda5c Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 17 Nov 2012 15:02:18 +0100 Subject: [PATCH 19/19] Script to generate a test manifest for Privoxy --- tests/gen-skip-reasons.pl | 84 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100755 tests/gen-skip-reasons.pl diff --git a/tests/gen-skip-reasons.pl b/tests/gen-skip-reasons.pl new file mode 100755 index 0000000..16f8fc6 --- /dev/null +++ b/tests/gen-skip-reasons.pl @@ -0,0 +1,84 @@ +#!/usr/bin/perl + +use warnings; +use strict; + +sub main() { + for my $testnum (1..2000) { + my $why; + if ($testnum eq 16 or + $testnum eq 45 or + $testnum eq 63) { + $why = "Not supposed to work with Privoxy. Expected forwarding failure. Workaround probably possible."; + } elsif ($testnum eq 17) { + $why = "Not supposed to work with Privoxy. Invalid METHODs get rejected."; + } elsif ($testnum eq 19 or + $testnum eq 20) { + $why = "Not supposed to work with Privoxy. Tests behaviour with non-existing server and doesn't deal with error messages coming from a proxy."; + } elsif ($testnum eq 30 or + $testnum eq 37 or + $testnum eq 66 or + $testnum eq 1079) { + $why = "Expected to fail with Privoxy. In case of missing server headers Privoxy generates an error message the test doesn't expect."; + } elsif ($testnum eq 59) { + $why = 'Privoxy bug. HTTP URL with slash but with "parameter". Request should be rejected as invalid.'; + } elsif ($testnum eq 187) { + $why = "Expected to fails due to invalid URL. Privoxy's is unreasonable, though, and should probably be fixed."; + } elsif ($testnum eq 56 or + $testnum eq 60 or + $testnum eq 207 or + $testnum eq 218 or + $testnum eq 508 or + $testnum eq 510 or + $testnum eq 565 or + $testnum eq 579 or + $testnum eq 1068 or + $testnum eq 1072 or + $testnum eq 1073) { + $why = "Expected to fail. Privoxy doesn't support chunked transfer encoding on the client-side. Support should be added."; + } elsif ($testnum eq 260) { + $why = "Known to fail. Looks like a curl bug. The URL passed to Privoxy is invalid but the test expect a valid one when not using a proxy"; + } elsif ($testnum eq 262) { + $why = "Not supposed to work with Privoxy. Privoxy doesn't support nul bytes in headers and neither does the spec."; + } elsif ($testnum eq 1052) { + $why = "Expected to fail. Connection header expected in one response but not in the other. Not yet covered by runtests.pl's proxy mode."; + } elsif ($testnum eq 1118) { + $why = "Expected to fail. Looks like a curl bug although Privoxy's behaviour seems subobtimal as well."; + } elsif ($testnum eq 1310) { + $why = "Known to fail. NTLM-related. Cause not properly diagnosed yet. Privoxy's behaviour seems reasonable."; + } elsif ($testnum eq 155) { + $why = "Known to fail. Not yet analyzed."; + } elsif ($testnum eq 158) { + $why = "Known to fail. No properly analyzed. Probably Privoxy's continue hack is insufficient."; + } elsif ($testnum eq 507) { + $why = "Expected to fail. DNS failures cause a Privoxy error message the test doesn't handle."; + } elsif ($testnum eq 530 or + $testnum eq 584) { + $why = "Known to fail. Test server expects pipelined requests and doesn't respond otherwise."; + } elsif ($testnum eq 556) { + $why = "Expected to fail. Uses HTTP/1.2 which Privoxy rejects as invalid."; + } elsif ($testnum eq 581) { + $why = "Expected to fail. Privoxy only allows one Content-Type per request."; + } elsif ($testnum eq 2032) { + $why = "Known to fail. Doesn't work without Privoxy on FreeBSD either: http://curl.haxx.se/mail/lib-2012-11/0095.html"; + } + printf("test:%04d: %s\n", $testnum, $why)if (defined $why); + } + + foreach my $protocol ('FTP', 'POP3', 'IMAP', 'SMTP', 'GOPHER', 'TELNET') { + # Curl's behaviour when combining --proxy, -H and telnet:// seems strange and may be a bug." + printf("keyword:%s: Protocol %s is not supported by Privoxy.\n", $protocol, $protocol); + } + + foreach my $misc ('proxy', '--resolve', '--libcurl') { + printf("keyword:%s: Tests with keyword '%s' currently don't work with Privoxy as they need addtional runtests.pl changes.\n", $misc, $misc); + } + printf("keyword:%s: Tests with keyword '%s' aren't expected to work with Privoxy running in a jail without IPv6 connectivity.\n", 'IPv6', 'IPv6'); + +# foreach my $tool ('libntlmconnect', 'libauthretry') { +# printf("tool:%s: Tests with tool '%s' are not proxified yet.\n", $tool, $tool); +# } + +} + +main(); -- 1.8.0