test277 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP FORMPOST
  6. </keywords>
  7. </info>
  8. # Server-side
  9. <reply>
  10. <data>
  11. HTTP/1.1 200 OK swsclose
  12. Date: Thu, 09 Nov 2010 14:49:00 GMT
  13. Server: test-server/fake
  14. Content-Length: 11
  15. blablabla
  16. </data>
  17. </reply>
  18. # Client-side
  19. <client>
  20. <server>
  21. http
  22. </server>
  23. <name>
  24. HTTP RFC1867-type formposting with custom Content-Type
  25. </name>
  26. <command>
  27. http://%HOSTIP:%HTTPPORT/want/277 -F name=daniel -H "Content-Type: text/info"
  28. </command>
  29. </client>
  30. # Verify data after the test has been "shot"
  31. <verify>
  32. <strip>
  33. ^User-Agent:.*
  34. </strip>
  35. <strippart>
  36. s/^--------------------------[a-z0-9]*/--------------------------/
  37. s/boundary=------------------------[a-z0-9]*/boundary=------------------------/
  38. </strippart>
  39. <protocol>
  40. POST /want/277 HTTP/1.1
  41. User-Agent: curl/7.10.4 (i686-pc-linux-gnu) libcurl/7.10.4 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  42. Host: %HOSTIP:%HTTPPORT
  43. Accept: */*
  44. Content-Length: 146
  45. Content-Type: text/info; boundary=------------------------
  46. --------------------------
  47. Content-Disposition: attachment; name="name"
  48. daniel
  49. ----------------------------
  50. </protocol>
  51. </verify>
  52. </testcase>