test234 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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: Tue, 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/%TESTNUMBER0002
  22. Content-Length: 8
  23. Connection: close
  24. contents
  25. </data>
  26. <data2>
  27. HTTP/1.1 200 OK
  28. Date: Tue, 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: Tue, 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/%TESTNUMBER0002
  42. Content-Length: 8
  43. Connection: close
  44. HTTP/1.1 200 OK
  45. Date: Tue, 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/%TESTNUMBER -x %HOSTIP:%HTTPPORT --user iam:myself --proxy-user testing:this --location-trusted
  64. </command>
  65. <features>
  66. proxy
  67. </features>
  68. </client>
  69. #
  70. # Verify data after the test has been "shot"
  71. <verify>
  72. <protocol>
  73. GET http://first.host.it.is/we/want/that/page/%TESTNUMBER HTTP/1.1
  74. Host: first.host.it.is
  75. Proxy-Authorization: Basic dGVzdGluZzp0aGlz
  76. Authorization: Basic aWFtOm15c2VsZg==
  77. User-Agent: curl/%VERSION
  78. Accept: */*
  79. Proxy-Connection: Keep-Alive
  80. GET http://goto.second.host.now/%TESTNUMBER0002 HTTP/1.1
  81. Host: goto.second.host.now
  82. Proxy-Authorization: Basic dGVzdGluZzp0aGlz
  83. Authorization: Basic aWFtOm15c2VsZg==
  84. User-Agent: curl/%VERSION
  85. Accept: */*
  86. Proxy-Connection: Keep-Alive
  87. </protocol>
  88. </verify>
  89. </testcase>