test259 3.2 KB

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