2
0

test1142 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP proxy
  7. followlocation
  8. </keywords>
  9. </info>
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 302 This is a weirdo text message
  14. Connection: close
  15. Location: http:////foo.example.com/want/%TESTNUMBER0001
  16. This server reply is for testing
  17. </data>
  18. <data1>
  19. HTTP/1.1 200 hello
  20. Connection: close
  21. Content-Length: 4
  22. hej
  23. </data1>
  24. <datacheck>
  25. HTTP/1.1 302 This is a weirdo text message
  26. Connection: close
  27. Location: http:////foo.example.com/want/%TESTNUMBER0001
  28. </datacheck>
  29. </reply>
  30. # Client-side
  31. <client>
  32. <server>
  33. http
  34. </server>
  35. <name>
  36. HTTP redirect to http://// (four slashes!)
  37. </name>
  38. <command>
  39. %HOSTIP:%HTTPPORT/want/%TESTNUMBER -L -x http://%HOSTIP:%HTTPPORT
  40. </command>
  41. <features>
  42. proxy
  43. </features>
  44. </client>
  45. # Verify data after the test has been "shot"
  46. <verify>
  47. <protocol>
  48. GET http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER HTTP/1.1
  49. Host: %HOSTIP:%HTTPPORT
  50. User-Agent: curl/%VERSION
  51. Accept: */*
  52. Proxy-Connection: Keep-Alive
  53. </protocol>
  54. # 3, CURLE_URL_MALFORMAT for the four slashes
  55. <errorcode>
  56. 3
  57. </errorcode>
  58. </verify>
  59. </testcase>