test437 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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: Tue, 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="[ffff::1]:8181"
  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. Alt-Svc to numerical IPv6 address
  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/%TESTNUMBER --alt-svc "%LOGDIR/altsvc-%TESTNUMBER"
  41. </command>
  42. </client>
  43. #
  44. # Verify data after the test has been "shot"
  45. <verify>
  46. <protocol>
  47. GET /%TESTNUMBER HTTP/1.1
  48. Host: %HOSTIP:%HTTPPORT
  49. User-Agent: curl/%VERSION
  50. Accept: */*
  51. </protocol>
  52. <stripfile>
  53. # strip out the (dynamic) expire date from the file so that the rest
  54. # matches
  55. s/\"([^\"]*)\"/TIMESTAMP/
  56. </stripfile>
  57. <file name="%LOGDIR/altsvc-%TESTNUMBER" mode="text">
  58. # Your alt-svc cache. https://curl.se/docs/alt-svc.html
  59. # This file was generated by libcurl! Edit at your own risk.
  60. h1 %HOSTIP %HTTPPORT h1 [ffff::1] 8181 TIMESTAMP 0 0
  61. </file>
  62. </verify>
  63. </testcase>