test1908 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <testcase>
  2. <info>
  3. <keywords>
  4. CURLINFO_EFFECTIVE_URL
  5. </keywords>
  6. </info>
  7. # Server-side
  8. <reply>
  9. <data nocheck="yes">
  10. HTTP/1.1 200 OK swsbounce
  11. Date: Tue, 09 Nov 2010 14:49:00 GMT
  12. Server: test-server/fake
  13. Content-Type: text/html
  14. Funny-head: yesyes swsclose
  15. Content-Length: 0
  16. alt-svc: h2="3dbbdetxoyw4nsp6c3cc456oj2ays6s43ezxzsfxxri3h5xqd.example:443"; ma=315360000; persist=1
  17. </data>
  18. # This is the second response
  19. <data1 nocheck="yes">
  20. HTTP/1.1 200 OK
  21. Connection: close
  22. Content-Length: 0
  23. alt-svc: h2="second.example:443"; ma=315360000;
  24. </data1>
  25. </reply>
  26. # Client-side
  27. <client>
  28. <server>
  29. http
  30. </server>
  31. # require debug so that alt-svc can work over plain old HTTP
  32. <features>
  33. alt-svc
  34. debug
  35. </features>
  36. <name>
  37. alt-svc cache save after resetting the handle
  38. </name>
  39. <setenv>
  40. # make debug-curl accept Alt-Svc over plain HTTP
  41. CURL_ALTSVC_HTTP="yeah"
  42. </setenv>
  43. <tool>
  44. lib%TESTNUMBER
  45. </tool>
  46. <command>
  47. %HOSTIP:%HTTPPORT/%TESTNUMBER
  48. </command>
  49. </client>
  50. # Verify data after the test has been "shot"
  51. <verify>
  52. <protocol>
  53. GET /%TESTNUMBER HTTP/1.1
  54. Host: %HOSTIP:%HTTPPORT
  55. Accept: */*
  56. GET /%TESTNUMBER HTTP/1.1
  57. Host: %HOSTIP:%HTTPPORT
  58. Accept: */*
  59. </protocol>
  60. <stripfile>
  61. # strip out the (dynamic) expire date from the file so that the rest
  62. # matches
  63. s/\"([^\"]*)\"/TIMESTAMP/
  64. </stripfile>
  65. <file name="log/altsvc-%TESTNUMBER" mode="text">
  66. # Your alt-svc cache. https://curl.se/docs/alt-svc.html
  67. # This file was generated by libcurl! Edit at your own risk.
  68. h1 127.0.0.1 %HTTPPORT h2 3dbbdetxoyw4nsp6c3cc456oj2ays6s43ezxzsfxxri3h5xqd.example 443 TIMESTAMP 1 0
  69. </file>
  70. </verify>
  71. </testcase>