Analyze the HTTP header during File Upload

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.