test667 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. HTTP MIME POST
  7. </keywords>
  8. </info>
  9. #
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 200 OK
  14. Date: Tue, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake swsclose
  16. Connection: close
  17. Content-Type: text/html
  18. hello
  19. </data>
  20. <datacheck>
  21. HTTP/1.1 200 OK
  22. Date: Tue, 09 Nov 2010 14:49:00 GMT
  23. Server: test-server/fake swsclose
  24. Connection: close
  25. Content-Type: text/html
  26. hello
  27. </datacheck>
  28. </reply>
  29. # Client-side
  30. <client>
  31. <server>
  32. http
  33. </server>
  34. # tool is what to use instead of 'curl'
  35. <tool>
  36. lib%TESTNUMBER
  37. </tool>
  38. <name>
  39. HTTP chunked mimepost using single-byte read callback with encoder
  40. </name>
  41. <command>
  42. http://%HOSTIP:%HTTPPORT/%TESTNUMBER
  43. </command>
  44. </client>
  45. #
  46. # Verify data after the test has been "shot"
  47. <verify>
  48. <strippart>
  49. s/^--------------------------[a-z0-9]*/------------------------------/
  50. s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
  51. </strippart>
  52. # Note that the stripping above removes 12 bytes from every occurrence of the
  53. # boundary string and since 5 of them are in the body contents, we see
  54. # (5*12) == 60 bytes less
  55. <protocol>
  56. POST /%TESTNUMBER HTTP/1.1
  57. Host: %HOSTIP:%HTTPPORT
  58. Accept: */*
  59. Transfer-Encoding: chunked
  60. Content-Type: multipart/form-data; boundary=----------------------------
  61. Expect: 100-continue
  62. %if hyper
  63. 7F
  64. %else
  65. 7f
  66. %endif
  67. ------------------------------
  68. Content-Disposition: form-data; name="field"
  69. Content-Transfer-Encoding: base64
  70. 4
  71. ZHVt
  72. 34
  73. bXk=
  74. --------------------------------
  75. 0
  76. </protocol>
  77. </verify>
  78. </testcase>