2
0

test1141 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP proxy
  7. followlocation
  8. </keywords>
  9. </info>
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 302 This is a weirdo text message
  14. Connection: close
  15. Location: http:///foo.example.com/want/%TESTNUMBER0001
  16. This server reply is for testing
  17. </data>
  18. <data1>
  19. HTTP/1.1 200 hello
  20. Connection: close
  21. Content-Length: 4
  22. hej
  23. </data1>
  24. <datacheck>
  25. HTTP/1.1 302 This is a weirdo text message
  26. Connection: close
  27. Location: http:///foo.example.com/want/%TESTNUMBER0001
  28. HTTP/1.1 200 hello
  29. Connection: close
  30. Content-Length: 4
  31. hej
  32. </datacheck>
  33. </reply>
  34. # Client-side
  35. <client>
  36. <server>
  37. http
  38. </server>
  39. <name>
  40. HTTP redirect to http:/// (three slashes!)
  41. </name>
  42. <command>
  43. %HOSTIP:%HTTPPORT/want/%TESTNUMBER -L -x http://%HOSTIP:%HTTPPORT
  44. </command>
  45. <features>
  46. proxy
  47. </features>
  48. </client>
  49. # Verify data after the test has been "shot"
  50. <verify>
  51. <protocol>
  52. GET http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER HTTP/1.1
  53. Host: %HOSTIP:%HTTPPORT
  54. User-Agent: curl/%VERSION
  55. Accept: */*
  56. Proxy-Connection: Keep-Alive
  57. GET http://foo.example.com/want/%TESTNUMBER0001 HTTP/1.1
  58. Host: foo.example.com
  59. User-Agent: curl/%VERSION
  60. Accept: */*
  61. Proxy-Connection: Keep-Alive
  62. </protocol>
  63. </verify>
  64. </testcase>