test584 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. HTTP MIME
  7. </keywords>
  8. </info>
  9. #
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 200 OK swsclose
  14. Date: Tue, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake
  16. Content-Length: 3
  17. OK
  18. </data>
  19. <datacheck>
  20. HTTP/1.1 200 OK swsclose
  21. Date: Tue, 09 Nov 2010 14:49:00 GMT
  22. Server: test-server/fake
  23. Content-Length: 3
  24. OK
  25. HTTP/1.1 200 OK swsclose
  26. Date: Tue, 09 Nov 2010 14:49:00 GMT
  27. Server: test-server/fake
  28. Content-Length: 3
  29. OK
  30. </datacheck>
  31. </reply>
  32. # Client-side
  33. <client>
  34. <server>
  35. http
  36. </server>
  37. # tool to invoke
  38. <tool>
  39. lib%TESTNUMBER
  40. </tool>
  41. <name>
  42. CURLOPT_MIMEPOST first set then set to NULL
  43. </name>
  44. <command>
  45. http://%HOSTIP:%HTTPPORT/%TESTNUMBER
  46. </command>
  47. </client>
  48. #
  49. # Verify data after the test has been "shot"
  50. <verify>
  51. <strippart>
  52. s/^--------------------------[a-z0-9]*/--------------------------/
  53. s/boundary=------------------------[a-z0-9]*/boundary=------------------------/
  54. </strippart>
  55. <protocol>
  56. POST /%TESTNUMBER HTTP/1.1
  57. Host: %HOSTIP:%HTTPPORT
  58. Accept: */*
  59. Content-Length: 144
  60. Content-Type: multipart/form-data; boundary=------------------------
  61. --------------------------
  62. Content-Disposition: form-data; name="fake"
  63. party
  64. ----------------------------
  65. POST /%TESTNUMBER HTTP/1.1
  66. Host: %HOSTIP:%HTTPPORT
  67. Accept: */*
  68. Content-Length: 0
  69. </protocol>
  70. </verify>
  71. </testcase>