Analyze the header of the submitted HTTP request.
POST/struts-upload/upload. do? QueryParam = Successful HTTP/1.1
Accept :*/*
Referer: http: // 127.0.0.1: 8080/struts-upload/upload. jsp
Accept-Language: zh-cn
Content-Type: multipart/form-data; boundary = --------------------------- 7d5d116460764
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon;. net clr 1.1.4322)
Host: 127.0.0.1: 8080
Content-Length: 59433
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: JSESSIONID = listen; JSESSIONID = A85A47CD8A8334BCBCA65ACB51A7B550 --------------------------- 7d5d116460764
Content-Disposition: form-data; name = "theText" haha
----------------------------- 7d5d116460764
Content-Disposition: form-data; name = "theFile"; filename = "C: \ Documents ents and Settings \ yym \ Desktop \ Flash IDE Plugin.doc"
Content-Type: application/msword
Binary File Content
-----------------------------7d5d116460764
Content-Disposition: form-data; name="writeFile" on
-----------------------------7d5d116460764
Content-Disposition: form-data; name="filePath" c://haha.doc
-----------------------------7d5d116460764--
Note: Content-Type: multipart/form-data; boundary = --------------------------- 7d5d116460764. In the HTML page on which a file is submitted, all forms are of multipart/form-data Type, if a file is uploaded, a boundary number is displayed, and the number is --------------------------- 7d5d116460764. This is more like a separator, which separates each field in the form. After a --------------------------- 7d5d116460764 file, there is
Content-Disposition: form-data; name = "theFile"; filename = "C: \ Documents ents and Settings \ yym \ Desktop \ Flash IDE Plugin.doc"
Content-Type: application/msword
Binary File Content
The form domain name, file path, type, and binary content of the file are marked here.