test446 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <testcase>
  3. <info>
  4. <keywords>
  5. HTTP
  6. HTTP proxy
  7. HSTS
  8. trailing-dot
  9. </keywords>
  10. </info>
  11. <reply>
  12. # we use this as response to a CONNECT
  13. <connect nocheck="yes">
  14. HTTP/1.1 200 OK
  15. </connect>
  16. <data crlf="yes">
  17. HTTP/1.1 200 OK
  18. Content-Length: 6
  19. Strict-Transport-Security: max-age=604800
  20. -foo-
  21. </data>
  22. <data2 crlf="yes">
  23. HTTP/1.1 200 OK
  24. Content-Length: 6
  25. Strict-Transport-Security: max-age=6048000
  26. -baa-
  27. </data2>
  28. </reply>
  29. <client>
  30. <server>
  31. https
  32. http-proxy
  33. </server>
  34. <features>
  35. HSTS
  36. proxy
  37. https
  38. debug
  39. </features>
  40. <setenv>
  41. CURL_HSTS_HTTP=yes
  42. CURL_TIME=2000000000
  43. </setenv>
  44. <name>
  45. HSTS with two URLs
  46. </name>
  47. <command>
  48. -x http://%HOSTIP:%PROXYPORT --hsts %LOGDIR/hsts%TESTNUMBER http://this.hsts.example./%TESTNUMBER http://another.example.com/%TESTNUMBER0002
  49. </command>
  50. </client>
  51. <verify>
  52. # we let it CONNECT to the server to confirm HSTS but deny from there
  53. <proxy crlf="yes">
  54. GET http://this.hsts.example./%TESTNUMBER HTTP/1.1
  55. Host: this.hsts.example.
  56. User-Agent: curl/%VERSION
  57. Accept: */*
  58. Proxy-Connection: Keep-Alive
  59. GET http://another.example.com/%TESTNUMBER0002 HTTP/1.1
  60. Host: another.example.com
  61. User-Agent: curl/%VERSION
  62. Accept: */*
  63. Proxy-Connection: Keep-Alive
  64. </proxy>
  65. <file name="%LOGDIR/hsts%TESTNUMBER" mode="text">
  66. # Your HSTS cache. https://curl.se/docs/hsts.html
  67. # This file was generated by libcurl! Edit at your own risk.
  68. this.hsts.example "20330525 03:33:20"
  69. another.example.com "20330727 03:33:20"
  70. </file>
  71. </verify>
  72. </testcase>