Return to test654 CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / curl / tests / data |
1.1 ! misho 1: <testcase> ! 2: <info> ! 3: <keywords> ! 4: HTTP ! 5: HTTP POST ! 6: HTTP MIME POST ! 7: </keywords> ! 8: </info> ! 9: ! 10: # ! 11: # Server-side ! 12: <reply> ! 13: <data> ! 14: HTTP/1.1 200 OK ! 15: Date: Thu, 09 Nov 2010 14:49:00 GMT ! 16: Server: test-server/fake swsclose ! 17: Connection: close ! 18: Content-Type: text/html ! 19: ! 20: hello ! 21: </data> ! 22: <datacheck> ! 23: HTTP/1.1 200 OK ! 24: Date: Thu, 09 Nov 2010 14:49:00 GMT ! 25: Server: test-server/fake swsclose ! 26: Connection: close ! 27: Content-Type: text/html ! 28: ! 29: hello ! 30: HTTP/1.1 200 OK ! 31: Date: Thu, 09 Nov 2010 14:49:00 GMT ! 32: Server: test-server/fake swsclose ! 33: Connection: close ! 34: Content-Type: text/html ! 35: ! 36: hello ! 37: </datacheck> ! 38: </reply> ! 39: ! 40: # Client-side ! 41: <client> ! 42: <server> ! 43: http ! 44: </server> ! 45: # tool is what to use instead of 'curl' ! 46: <tool> ! 47: lib654 ! 48: </tool> ! 49: ! 50: <name> ! 51: HTTP duplicate easy handle with mime data ! 52: </name> ! 53: <command> ! 54: http://%HOSTIP:%HTTPPORT/654 ! 55: </command> ! 56: <file name="log/file654.txt"> ! 57: This is data from a file ! 58: </file> ! 59: </client> ! 60: ! 61: # ! 62: # Verify data after the test has been "shot" ! 63: <verify> ! 64: <strippart> ! 65: s/^--------------------------[a-z0-9]*/------------------------------/ ! 66: s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/ ! 67: </strippart> ! 68: # Note that the stripping above removes 12 bytes from every occurrence of the ! 69: # boundary string and since 5 of them are in the body contents, we see ! 70: # (5*12) == 60 bytes less ! 71: <protocol> ! 72: POST /654 HTTP/1.1 ! 73: Host: %HOSTIP:%HTTPPORT ! 74: Accept: */* ! 75: Content-Length: 0 ! 76: ! 77: POST /654 HTTP/1.1 ! 78: Host: %HOSTIP:%HTTPPORT ! 79: Accept: */* ! 80: Transfer-Encoding: chunked ! 81: Content-Type: multipart/form-data; boundary=---------------------------- ! 82: Expect: 100-continue ! 83: ! 84: 1af ! 85: ------------------------------ ! 86: Content-Disposition: form-data; name="greeting" ! 87: Content-Type: application/X-Greeting ! 88: Content-Transfer-Encoding: base64 ! 89: X-Test-Number: 654 ! 90: ! 91: aGVsbG8= ! 92: ------------------------------ ! 93: Content-Disposition: form-data; filename="file654.txt" ! 94: Content-Type: text/plain ! 95: ! 96: This is data from a file ! 97: ! 98: ------------------------------ ! 99: Content-Disposition: form-data ! 100: ! 101: ! 102: 1 ! 103: d ! 104: 1 ! 105: u ! 106: 1 ! 107: m ! 108: 1 ! 109: m ! 110: 1 ! 111: y ! 112: 1 ! 113: ! 114: ! 115: 30 ! 116: ! 117: -------------------------------- ! 118: ! 119: 0 ! 120: ! 121: </protocol> ! 122: </verify> ! 123: </testcase>