test976 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP proxy
  6. --location-trusted
  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 --location-trusted
  58. </name>
  59. <command>
  60. -x http://%HOSTIP:%HTTPPORT http://firsthost.com --location-trusted -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. Authorization: Basic am9lOnNlY3JldA==
  76. User-Agent: curl/%VERSION
  77. Accept: */*
  78. Proxy-Connection: Keep-Alive
  79. </protocol>
  80. </verify>
  81. </testcase>