test493 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP proxy
  6. HSTS
  7. url_effective
  8. </keywords>
  9. </info>
  10. <reply>
  11. # we use this as response to a CONNECT
  12. <connect nocheck="yes">
  13. HTTP/1.1 403 not OK at all
  14. Date: Tue, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake
  16. Content-Length: 6
  17. Connection: close
  18. Funny-head: yesyes
  19. -foo-
  20. </connect>
  21. </reply>
  22. <client>
  23. <server>
  24. http
  25. </server>
  26. <features>
  27. HSTS
  28. proxy
  29. https
  30. </features>
  31. <file name="log/input%TESTNUMBER">
  32. .hsts.example "99991001 04:47:41"
  33. </file>
  34. <name>
  35. HSTS and %{url_effective} after upgrade
  36. </name>
  37. <command>
  38. -x http://%HOSTIP:%HTTPPORT http://this.hsts.example/%TESTNUMBER --hsts log/input%TESTNUMBER -w '%{url_effective}\n'
  39. </command>
  40. </client>
  41. <verify>
  42. # we let it CONNECT to the server to confirm HSTS but deny from there
  43. <protocol>
  44. CONNECT this.hsts.example:443 HTTP/1.1
  45. Host: this.hsts.example:443
  46. User-Agent: curl/%VERSION
  47. Proxy-Connection: Keep-Alive
  48. </protocol>
  49. <stdout>
  50. HTTP/1.1 403 not OK at all
  51. Date: Tue, 09 Nov 2010 14:49:00 GMT
  52. Server: test-server/fake
  53. Content-Length: 6
  54. Connection: close
  55. Funny-head: yesyes
  56. https://this.hsts.example/%TESTNUMBER
  57. </stdout>
  58. # Proxy CONNECT aborted
  59. <errorcode>
  60. 56
  61. </errorcode>
  62. </verify>
  63. </testcase>