2
0

test258 3.2 KB

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