test363 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. HTTP CONNECT
  7. proxytunnel
  8. </keywords>
  9. </info>
  10. #
  11. # Server-side
  12. <reply>
  13. <data>
  14. HTTP/1.1 200 OK
  15. Date: Tue, 09 Nov 2010 14:49:00 GMT
  16. Server: test-server/fake swsclose
  17. Content-Type: text/html
  18. Funny-head: yesyes
  19. Content-Length: 9
  20. contents
  21. </data>
  22. <connect>
  23. HTTP/1.1 200 Mighty fine indeed
  24. </connect>
  25. <datacheck>
  26. HTTP/1.1 200 Mighty fine indeed
  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. </datacheck>
  35. </reply>
  36. #
  37. # Client-side
  38. <client>
  39. <features>
  40. debug
  41. proxy
  42. </features>
  43. <server>
  44. http
  45. http-proxy
  46. </server>
  47. <name>
  48. CONNECT with short sends
  49. </name>
  50. <setenv>
  51. # make the first send cut off after this amount of data
  52. CURL_SMALLREQSEND=48
  53. # make repeated sends small too
  54. CURL_SMALLSENDS=40
  55. </setenv>
  56. <command>
  57. http://test.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER -p -x %HOSTIP:%PROXYPORT -d "datatopost=ohthatsfunyesyes"
  58. </command>
  59. </client>
  60. #
  61. # Verify data after the test has been "shot"
  62. <verify>
  63. <proxy>
  64. CONNECT test.%TESTNUMBER:%HTTPPORT HTTP/1.1
  65. Host: test.%TESTNUMBER:%HTTPPORT
  66. User-Agent: curl/%VERSION
  67. Proxy-Connection: Keep-Alive
  68. </proxy>
  69. <protocol nonewline="yes">
  70. POST /we/want/that/page/%TESTNUMBER HTTP/1.1
  71. Host: test.%TESTNUMBER:%HTTPPORT
  72. User-Agent: curl/%VERSION
  73. Accept: */*
  74. Content-Length: 27
  75. Content-Type: application/x-www-form-urlencoded
  76. datatopost=ohthatsfunyesyes
  77. </protocol>
  78. </verify>
  79. </testcase>