test234 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP proxy
  7. HTTP proxy Basic auth
  8. followlocation
  9. --location-trusted
  10. </keywords>
  11. </info>
  12. #
  13. # Server-side
  14. <reply>
  15. <data>
  16. HTTP/1.1 302 OK
  17. Date: Thu, 09 Nov 2010 14:49:00 GMT
  18. Server: test-server/fake swsclose
  19. Content-Type: text/html
  20. Funny-head: yesyes
  21. Location: http://goto.second.host.now/2340002
  22. Content-Length: 8
  23. Connection: close
  24. contents
  25. </data>
  26. <data2>
  27. HTTP/1.1 200 OK
  28. Date: Thu, 09 Nov 2010 14:49:00 GMT
  29. Server: test-server/fake swsclose
  30. Content-Type: text/html
  31. Funny-head: yesyes
  32. Content-Length: 9
  33. contents
  34. </data2>
  35. <datacheck>
  36. HTTP/1.1 302 OK
  37. Date: Thu, 09 Nov 2010 14:49:00 GMT
  38. Server: test-server/fake swsclose
  39. Content-Type: text/html
  40. Funny-head: yesyes
  41. Location: http://goto.second.host.now/2340002
  42. Content-Length: 8
  43. Connection: close
  44. HTTP/1.1 200 OK
  45. Date: Thu, 09 Nov 2010 14:49:00 GMT
  46. Server: test-server/fake swsclose
  47. Content-Type: text/html
  48. Funny-head: yesyes
  49. Content-Length: 9
  50. contents
  51. </datacheck>
  52. </reply>
  53. #
  54. # Client-side
  55. <client>
  56. <server>
  57. http
  58. </server>
  59. <name>
  60. HTTP, proxy, site+proxy auth and Location: to new host using location-trusted
  61. </name>
  62. <command>
  63. http://first.host.it.is/we/want/that/page/234 -x %HOSTIP:%HTTPPORT --user iam:myself --proxy-user testing:this --location-trusted
  64. </command>
  65. </client>
  66. #
  67. # Verify data after the test has been "shot"
  68. <verify>
  69. <strip>
  70. ^User-Agent:.*
  71. </strip>
  72. <protocol>
  73. GET http://first.host.it.is/we/want/that/page/234 HTTP/1.1
  74. Proxy-Authorization: Basic dGVzdGluZzp0aGlz
  75. Authorization: Basic aWFtOm15c2VsZg==
  76. Host: first.host.it.is
  77. Accept: */*
  78. Proxy-Connection: Keep-Alive
  79. GET http://goto.second.host.now/2340002 HTTP/1.1
  80. Proxy-Authorization: Basic dGVzdGluZzp0aGlz
  81. Authorization: Basic aWFtOm15c2VsZg==
  82. Host: goto.second.host.now
  83. Accept: */*
  84. Proxy-Connection: Keep-Alive
  85. </protocol>
  86. </verify>
  87. </testcase>