test974 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP proxy
  6. --location
  7. </keywords>
  8. </info>
  9. #
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 301 redirect
  14. Date: Tue, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake
  16. Content-Length: 0
  17. Connection: close
  18. Content-Type: text/html
  19. Location: http://firsthost.com:9999/a/path/%TESTNUMBER0002
  20. </data>
  21. <data2>
  22. HTTP/1.1 200 OK
  23. Date: Tue, 09 Nov 2010 14:49:00 GMT
  24. Server: test-server/fake
  25. Content-Length: 4
  26. Connection: close
  27. Content-Type: text/html
  28. hey
  29. </data2>
  30. <datacheck>
  31. HTTP/1.1 301 redirect
  32. Date: Tue, 09 Nov 2010 14:49:00 GMT
  33. Server: test-server/fake
  34. Content-Length: 0
  35. Connection: close
  36. Content-Type: text/html
  37. Location: http://firsthost.com:9999/a/path/%TESTNUMBER0002
  38. HTTP/1.1 200 OK
  39. Date: Tue, 09 Nov 2010 14:49:00 GMT
  40. Server: test-server/fake
  41. Content-Length: 4
  42. Connection: close
  43. Content-Type: text/html
  44. hey
  45. </datacheck>
  46. </reply>
  47. #
  48. # Client-side
  49. <client>
  50. <features>
  51. proxy
  52. </features>
  53. <server>
  54. http
  55. </server>
  56. <name>
  57. HTTP with auth redirected to HTTP on a diff port w/o auth
  58. </name>
  59. <command>
  60. -x http://%HOSTIP:%HTTPPORT http://firsthost.com -L -u joe:secret
  61. </command>
  62. </client>
  63. #
  64. # Verify data after the test has been "shot"
  65. <verify>
  66. <protocol>
  67. GET http://firsthost.com/ HTTP/1.1
  68. Host: firsthost.com
  69. Authorization: Basic am9lOnNlY3JldA==
  70. User-Agent: curl/%VERSION
  71. Accept: */*
  72. Proxy-Connection: Keep-Alive
  73. GET http://firsthost.com:9999/a/path/%TESTNUMBER0002 HTTP/1.1
  74. Host: firsthost.com:9999
  75. User-Agent: curl/%VERSION
  76. Accept: */*
  77. Proxy-Connection: Keep-Alive
  78. </protocol>
  79. </verify>
  80. </testcase>