test277 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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: 145
  45. Expect: 100-continue
  46. Content-Type: text/info; boundary=----------------------------
  47. ------------------------------
  48. Content-Disposition: form-data; name="name"
  49. daniel
  50. --------------------------------
  51. </protocol>
  52. </verify>
  53. </testcase>