test277 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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: Tue, 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/%TESTNUMBER -F name=daniel -H "Content-Type: text/info"
  28. </command>
  29. </client>
  30. # Verify data after the test has been "shot"
  31. <verify>
  32. <strippart>
  33. s/^--------------------------[a-z0-9]*/--------------------------/
  34. s/boundary=------------------------[a-z0-9]*/boundary=------------------------/
  35. </strippart>
  36. <protocol>
  37. POST /want/%TESTNUMBER HTTP/1.1
  38. Host: %HOSTIP:%HTTPPORT
  39. User-Agent: curl/%VERSION
  40. Accept: */*
  41. Content-Length: 146
  42. Content-Type: text/info; boundary=------------------------
  43. --------------------------
  44. Content-Disposition: attachment; name="name"
  45. daniel
  46. ----------------------------
  47. </protocol>
  48. </verify>
  49. </testcase>