test356 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. Alt-Svc
  6. </keywords>
  7. </info>
  8. #
  9. # Server-side
  10. <reply>
  11. <data>
  12. HTTP/1.1 200 OK
  13. Date: Thu, 09 Nov 2010 14:49:00 GMT
  14. Content-Length: 6
  15. Connection: close
  16. Content-Type: text/html
  17. Funny-head: yesyes
  18. Alt-Svc: h1="nowhere.foo:81", un-kno22!wn=":82"
  19. -foo-
  20. </data>
  21. </reply>
  22. #
  23. # Client-side
  24. <client>
  25. <features>
  26. debug
  27. alt-svc
  28. </features>
  29. <server>
  30. http
  31. </server>
  32. <name>
  33. parse incoming Alt-Svc and save to file
  34. </name>
  35. <setenv>
  36. # make debug-curl accept Alt-Svc over plain HTTP
  37. CURL_ALTSVC_HTTP="yeah"
  38. </setenv>
  39. <command>
  40. http://%HOSTIP:%HTTPPORT/356 --alt-svc "log/altsvc-356"
  41. </command>
  42. </client>
  43. #
  44. # Verify data after the test has been "shot"
  45. <verify>
  46. <strip>
  47. ^User-Agent:.*
  48. </strip>
  49. <protocol>
  50. GET /356 HTTP/1.1
  51. Host: %HOSTIP:%HTTPPORT
  52. Accept: */*
  53. </protocol>
  54. <stripfile>
  55. # strip out the (dynamic) expire date from the file so that the rest
  56. # matches
  57. s/\"([^\"]*)\"/TIMESTAMP/
  58. </stripfile>
  59. <file name="log/altsvc-356">
  60. # Your alt-svc cache. https://curl.haxx.se/docs/alt-svc.html
  61. # This file was generated by libcurl! Edit at your own risk.
  62. h1 %HOSTIP %HTTPPORT h1 nowhere.foo 81 TIMESTAMP 0 0
  63. </file>
  64. </verify>
  65. </testcase>