test233 1.7 KB

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