示例:
POST /imeiLog.phpHTTP/1.1
Host: www.baidu.com
Content-Length:205
Accept:*/*
Content-Type:multipart/form-data; boundary=----7db372eb000e2
Connection: Keep-Alive
------7db372eb000e2
Content-Disposition:form-data; name=”file”; filename=“147.txt”
Content-Type:text/html
UserID=bjbg&PWD=123456 //文件内容
------7db372eb000e2--
说明:
1.如果文件过大,一次传不完 则分包上传 只传内容就可以 头只传一次 尾也只传一次;
2.红色部分为HTTP协议头 紫色部分为传输文件内容
3.相关博客:http://www.cnblogs.com/frustrate2/archive/2012/11/07/2759080.html;