test166 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <testcase>
  2. # Server-side
  3. <reply>
  4. <data>
  5. HTTP/1.1 200 OK swsclose
  6. Date: Thu, 09 Nov 2010 14:49:00 GMT
  7. Server: test-server/fake
  8. Content-Length: 10
  9. blablabla
  10. </data>
  11. </reply>
  12. # Client-side
  13. <client>
  14. <server>
  15. http
  16. </server>
  17. <name>
  18. HTTP formpost a file with spaces in name
  19. </name>
  20. <command>
  21. http://%HOSTIP:%HTTPPORT/we/want/166 -F "name=@log/fie ld 166"
  22. </command>
  23. # We create this file before the command is invoked!
  24. <file name="log/fie ld 166">
  25. data inside the file
  26. </file>
  27. </client>
  28. # Verify data after the test has been "shot"
  29. <verify>
  30. <strip>
  31. ^(User-Agent:|Content-Type: multipart/form-data;|------------).*
  32. </strip>
  33. <protocol>
  34. POST /we/want/166 HTTP/1.1
  35. User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b zlib/1.1.4 c-ares/1.2.0 libidn/0.4.3
  36. Host: %HOSTIP:%HTTPPORT
  37. Accept: */*
  38. Content-Length: 223
  39. Expect: 100-continue
  40. Content-Type: multipart/form-data; boundary=----------------------------b0b3d6d23991
  41. ------------------------------b0b3d6d23991
  42. Content-Disposition: form-data; name="name"; filename="fie ld 166"
  43. Content-Type: application/octet-stream
  44. data inside the file
  45. ------------------------------b0b3d6d23991--
  46. </protocol>
  47. </verify>
  48. </testcase>