test259 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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: Tue, 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: Tue, 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. proxy
  52. </features>
  53. <name>
  54. HTTP POST multipart with Expect: header using proxy anyauth (Digest)
  55. </name>
  56. <command>
  57. -x http://%HOSTIP:%HTTPPORT http://remotehost:54321/we/want/%TESTNUMBER -F name=daniel -F tool=curl -F file=@log/test%TESTNUMBER.txt -U uuuser:pppassword --proxy-anyauth -H "Expect: 100-continue"
  58. </command>
  59. # We create this file before the command is invoked!
  60. <file name="log/test%TESTNUMBER.txt">
  61. foo-
  62. This is a moo-
  63. bar
  64. </file>
  65. </client>
  66. # Verify data after the test has been "shot"
  67. <verify>
  68. <strip>
  69. ^(Content-Type: multipart/form-data;|------).*
  70. </strip>
  71. <protocol>
  72. POST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1
  73. Host: remotehost:54321
  74. User-Agent: curl/%VERSION
  75. Accept: */*
  76. Proxy-Connection: Keep-Alive
  77. Expect: 100-continue
  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="test%TESTNUMBER.txt"
  88. Content-Type: text/plain
  89. foo-
  90. This is a moo-
  91. bar
  92. ------------------------------7c633d5c27ce--
  93. POST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1
  94. Host: remotehost:54321
  95. Proxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/%TESTNUMBER", response="b479994d13e60f3aa192a67c5892ddc5"
  96. User-Agent: curl/%VERSION
  97. Accept: */*
  98. Proxy-Connection: Keep-Alive
  99. Expect: 100-continue
  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="test%TESTNUMBER.txt"
  110. Content-Type: text/plain
  111. foo-
  112. This is a moo-
  113. bar
  114. ------------------------------7c633d5c27ce--
  115. </protocol>
  116. </verify>
  117. </testcase>