test1561 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTPS
  5. HTTP
  6. HTTP GET
  7. cookies
  8. cookiejar
  9. HTTP replaced headers
  10. </keywords>
  11. </info>
  12. # Server-side
  13. <reply>
  14. <data1>
  15. HTTP/1.1 200 OK
  16. Date: Tue, 09 Nov 2010 14:49:00 GMT
  17. Server: test-server/fake
  18. Set-Cookie: super=secret; domain=example.com; path=/%TESTNUMBER; secure;
  19. Set-Cookie: supersuper=secret; domain=example.com; path=/%TESTNUMBER/login/; secure;
  20. Set-Cookie: __Secure-SID=12345; Domain=example.com
  21. Set-Cookie: __SecURE-SID=12346; Secure; Domain=example.com
  22. Set-Cookie: supersupersuper=secret; __Secure-SID=12346; Secure; Domain=example.com
  23. Set-Cookie: __Host-SID=22345
  24. Set-Cookie: __Host-SID=22346; Secure
  25. Set-Cookie: __Host-SID=22347; Domain=example.com
  26. Set-Cookie: __Host-SID=22348; Domain=example.com; Path=/
  27. Set-Cookie: __Host-SID=22349; Secure; Domain=example.com; Path=/
  28. Set-Cookie: __Host-SID=12346; Secure; Path=/
  29. Content-Length: 7
  30. nomnom
  31. </data1>
  32. <data2>
  33. HTTP/1.1 200 OK
  34. Date: Tue, 09 Nov 2010 14:49:00 GMT
  35. Server: test-server/fake
  36. Set-Cookie: super=plain; domain=example.com; path=/%TESTNUMBER; httponly;
  37. Set-Cookie: super=plain; domain=example.com; path=/%TESTNUMBER/; httponly;
  38. Set-Cookie: super=plain; domain=example.com; path=/15; httponly;
  39. Set-Cookie: public=yes; domain=example.com; path=/foo;
  40. Set-Cookie: supersuper=plain; domain=example.com; path=/%TESTNUMBER/login/en;
  41. Set-Cookie: supersuper=plain; domain=example.com; path=/%TESTNUMBER/login;
  42. Set-Cookie: secureoverhttp=yes; domain=example.com; path=/%TESTNUMBER; secure;
  43. Set-Cookie: __Secure-SID=22345; Domain=example.com
  44. Set-Cookie: __SecuRE-SID=22346; Secure; Domain=example.com
  45. Set-Cookie: __Host-SID=32345
  46. Set-Cookie: __Host-SID=32346; Secure
  47. Set-Cookie: __Host-SID=32347; Domain=example.com
  48. Set-Cookie: __Host-SID=32348; Domain=example.com; Path=/
  49. Set-Cookie: __Host-SID=32349; Secure; Domain=example.com; Path=/
  50. Set-Cookie: __Host-SID=32350; Secure; Path=/
  51. Content-Length: 7
  52. nomnom
  53. </data2>
  54. </reply>
  55. # Client-side
  56. <client>
  57. <features>
  58. SSL
  59. </features>
  60. <server>
  61. http
  62. https
  63. </server>
  64. <killserver>
  65. https
  66. </killserver>
  67. <name>
  68. Cookies set over HTTP can't override secure ones
  69. </name>
  70. <command>
  71. -k https://%HOSTIP:%HTTPSPORT/%TESTNUMBER0001 -L -c %LOGDIR/jar%TESTNUMBER.txt -H "Host: www.example.com" http://%HOSTIP:%HTTPPORT/%TESTNUMBER0002 -L -c %LOGDIR/jar%TESTNUMBER.txt -H "Host: www.example.com"
  72. </command>
  73. </client>
  74. <verify>
  75. <protocol>
  76. GET /%TESTNUMBER0001 HTTP/1.1
  77. Host: www.example.com
  78. User-Agent: curl/%VERSION
  79. Accept: */*
  80. GET /%TESTNUMBER0002 HTTP/1.1
  81. Host: www.example.com
  82. User-Agent: curl/%VERSION
  83. Accept: */*
  84. </protocol>
  85. <file name="%LOGDIR/jar%TESTNUMBER.txt" mode="text">
  86. # Netscape HTTP Cookie File
  87. # https://curl.se/docs/http-cookies.html
  88. # This file was generated by libcurl! Edit at your own risk.
  89. .example.com TRUE /foo FALSE 0 public yes
  90. #HttpOnly_.example.com TRUE /15 FALSE 0 super plain
  91. www.example.com FALSE / TRUE 0 __Host-SID 12346
  92. .example.com TRUE / TRUE 0 supersupersuper secret
  93. .example.com TRUE / TRUE 0 __SecURE-SID 12346
  94. .example.com TRUE /%TESTNUMBER/login/ TRUE 0 supersuper secret
  95. .example.com TRUE /1561 TRUE 0 super secret
  96. </file>
  97. </verify>
  98. </testcase>