test258 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. !SSPI
  53. crypto
  54. </features>
  55. <name>
  56. HTTP POST multipart without Expect: header using proxy anyauth (Digest)
  57. </name>
  58. <command>
  59. -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
  60. </command>
  61. # We create this file before the command is invoked!
  62. <file name="log/test258.txt">
  63. foo-
  64. This is a moo-
  65. bar
  66. </file>
  67. </client>
  68. # Verify data after the test has been "shot"
  69. <verify>
  70. <strip>
  71. ^(User-Agent:|Content-Type: multipart/form-data;|------).*
  72. </strip>
  73. <protocol>
  74. POST http://remotehost:54321/we/want/258 HTTP/1.1
  75. User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  76. Host: remotehost:54321
  77. Accept: */*
  78. Proxy-Connection: Keep-Alive
  79. Content-Length: 409
  80. Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
  81. ------------------------------7c633d5c27ce
  82. Content-Disposition: form-data; name="name"
  83. daniel
  84. ------------------------------7c633d5c27ce
  85. Content-Disposition: form-data; name="tool"
  86. curl
  87. ------------------------------7c633d5c27ce
  88. Content-Disposition: form-data; name="file"; filename="test258.txt"
  89. Content-Type: text/plain
  90. foo-
  91. This is a moo-
  92. bar
  93. ------------------------------7c633d5c27ce--
  94. POST http://remotehost:54321/we/want/258 HTTP/1.1
  95. User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  96. Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/258", response="2501654ca391f0b5c8c12a1da77e34cd"
  97. Host: remotehost:54321
  98. Accept: */*
  99. Proxy-Connection: Keep-Alive
  100. Content-Length: 409
  101. Content-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce
  102. ------------------------------7c633d5c27ce
  103. Content-Disposition: form-data; name="name"
  104. daniel
  105. ------------------------------7c633d5c27ce
  106. Content-Disposition: form-data; name="tool"
  107. curl
  108. ------------------------------7c633d5c27ce
  109. Content-Disposition: form-data; name="file"; filename="test258.txt"
  110. Content-Type: text/plain
  111. foo-
  112. This is a moo-
  113. bar
  114. ------------------------------7c633d5c27ce--
  115. </protocol>
  116. </verify>
  117. </testcase>