test1543 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. CURLOPT_CURLU
  6. </keywords>
  7. </info>
  8. #
  9. # Similar to 1518 but using CURLOPT_CURLU
  10. #
  11. # Server-side
  12. <reply>
  13. <data2 nocheck="yes">
  14. HTTP/1.1 200 OK
  15. Date: Thu, 17 Mar 2016 14:41:00 GMT
  16. Server: test-server/fake
  17. X-Special: swsclose
  18. Content-Length: 0
  19. Connection: close
  20. </data2>
  21. <data nocheck="yes">
  22. HTTP/1.1 302 redirect
  23. Date: Thu, 17 Mar 2016 14:41:00 GMT
  24. Server: test-server/fake
  25. Content-Type: text/plain; charset=US-ASCII
  26. Location: ../%TESTNUMBER0002
  27. Content-Length: 0
  28. Connection: close
  29. </data>
  30. </reply>
  31. # Client-side
  32. <client>
  33. <server>
  34. http
  35. </server>
  36. # tool is what to use instead of 'curl'
  37. <tool>
  38. lib%TESTNUMBER
  39. </tool>
  40. <name>
  41. CURLOPT_CURLU, URL with space and CURLINFO_EFFECTIVE_URL
  42. </name>
  43. <command>
  44. "http://%HOSTIP:%HTTPPORT/ /with/ space/ /file"
  45. </command>
  46. </client>
  47. #
  48. # Verify data after the test has been "shot"
  49. <verify>
  50. <protocol>
  51. GET /%20/with/%20space/%20/file HTTP/1.1
  52. Host: %HOSTIP:%HTTPPORT
  53. Accept: */*
  54. GET /%20/with/%20space/%TESTNUMBER0002 HTTP/1.1
  55. Host: %HOSTIP:%HTTPPORT
  56. Accept: */*
  57. </protocol>
  58. <stdout>
  59. res 0
  60. status 200
  61. redirects 1
  62. effectiveurl http://%HOSTIP:%HTTPPORT/%20/with/%20space/%TESTNUMBER0002
  63. redirecturl blank
  64. </stdout>
  65. <errorcode>
  66. 0
  67. </errorcode>
  68. </verify>
  69. </testcase>