test258 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP FORMPOST
  6. HTTP replaced headers
  7. HTTP proxy
  8. HTTP proxy Digest auth
  9. --proxy-anyauth
  10. </keywords>
  11. </info>
  12. # Server-side
  13. <reply>
  14. # The stupid test server doesn't response anything at all until the full
  15. # request has been sent, and then of course the full POST has already been
  16. # sent!
  17. <data>
  18. HTTP/1.1 407 no, tell me who you are first swsclose
  19. Date: Thu, 09 Nov 2010 14:49:00 GMT
  20. Server: test-server/fake
  21. Proxy-Authenticate: Digest realm="many secrets", nonce="911"
  22. Proxy-Connection: close
  23. Content-Length: 0
  24. </data>
  25. <data1000>
  26. HTTP/1.1 200 A OK
  27. Server: Microsoft-IIS/6.0
  28. Content-Type: text/html; charset=iso-8859-1
  29. Content-Length: 3
  30. ok
  31. </data1000>
  32. <datacheck>
  33. HTTP/1.1 407 no, tell me who you are first swsclose
  34. Date: Thu, 09 Nov 2010 14:49:00 GMT
  35. Server: test-server/fake
  36. Proxy-Authenticate: Digest realm="many secrets", nonce="911"
  37. Proxy-Connection: close
  38. Content-Length: 0
  39. HTTP/1.1 200 A OK
  40. Server: Microsoft-IIS/6.0
  41. Content-Type: text/html; charset=iso-8859-1
  42. Content-Length: 3
  43. ok
  44. </datacheck>
  45. </reply>
  46. # Client-side
  47. <client>
  48. <server>
  49. http
  50. </server>
  51. <features>
  52. crypto
  53. </features>
  54. <name>
  55. HTTP POST multipart without Expect: header using proxy anyauth (Digest)
  56. </name>
  57. <command>
  58. -x http://%HOSTIP:%HTTPPORT http://remotehost:54321/we/want/258 -F name=daniel -F tool=curl -F file=@log/test258.txt -H "Expect:" -U uuuser:pppassword --proxy-anyauth
  59. </command>
  60. # We create this file before the command is invoked!
  61. <file name="log/test258.txt">
  62. foo-
  63. This is a moo-
  64. bar
  65. </file>
  66. </client>
  67. # Verify data after the test has been "shot"
  68. <verify>
  69. <strip>
  70. ^(User-Agent:|Content-Type: multipart/form-data;|------).*
  71. </strip>
  72. <protocol>
  73. POST http://remotehost:54321/we/want/258 HTTP/1.1
  74. User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  75. Host: remotehost:54321
  76. Accept: */*
  77. Proxy-Connection: Keep-Alive
  78. Content-Length: 409
  79. Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
  80. ------------------------------7c633d5c27ce
  81. Content-Disposition: form-data; name="name"
  82. daniel
  83. ------------------------------7c633d5c27ce
  84. Content-Disposition: form-data; name="tool"
  85. curl
  86. ------------------------------7c633d5c27ce
  87. Content-Disposition: form-data; name="file"; filename="test258.txt"
  88. Content-Type: text/plain
  89. foo-
  90. This is a moo-
  91. bar
  92. ------------------------------7c633d5c27ce--
  93. POST http://remotehost:54321/we/want/258 HTTP/1.1
  94. User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  95. Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/258", response="2501654ca391f0b5c8c12a1da77e34cd"
  96. Host: remotehost:54321
  97. Accept: */*
  98. Proxy-Connection: Keep-Alive
  99. Content-Length: 409
  100. Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
  101. ------------------------------7c633d5c27ce
  102. Content-Disposition: form-data; name="name"
  103. daniel
  104. ------------------------------7c633d5c27ce
  105. Content-Disposition: form-data; name="tool"
  106. curl
  107. ------------------------------7c633d5c27ce
  108. Content-Disposition: form-data; name="file"; filename="test258.txt"
  109. Content-Type: text/plain
  110. foo-
  111. This is a moo-
  112. bar
  113. ------------------------------7c633d5c27ce--
  114. </protocol>
  115. </verify>
  116. </testcase>