【Http文件上传协议解析】

文件上传协议解析

Request URL:http://localhost:9090/mgr/upload

Request Method:POST

Status Code:200 OK

Remote Address:127.0.0.1:9090

Response Headers

Content-Language:zh-CN

Content-Length:474

Content-Type:text/html;charset=UTF-8

Date:Sun, 25 Mar 2018 09:00:23 GMT

Server:Apache-Coyote/1.1

Request Headers

view source

Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8

Accept-Encoding:gzip, deflate

Accept-Language:zh-CN,zh;q=0.8

Cache-Control:max-age=0

Connection:keep-alive

Content-Length:507

Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryQuauO8cjbvAJgX7q

Cookie:JSESSIONID=E6206D9665AA63E4CE390C8BA622E7B8

Host:localhost:9090

Origin:http://localhost:9090

Referer:http://localhost:9090/mgr/form

Upgrade-Insecure-Requests:1

User-Agent:Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36

Request Payload

------WebKitFormBoundaryQuauO8cjbvAJgX7q

Content-Disposition: form-data; name="email"

[email protected]

------WebKitFormBoundaryQuauO8cjbvAJgX7q

Content-Disposition: form-data; name="file1"; filename="11.txt"

Content-Type: text/plain

------WebKitFormBoundaryQuauO8cjbvAJgX7q

Content-Disposition: form-data; name="file2"; filename=""

Content-Type: application/octet-stream

------WebKitFormBoundaryQuauO8cjbvAJgX7q--

给服务器上传数据时,并非协议头每个字段都得说明,其中,content-type是必须的,它包括一个类似标志性质的名为boundary的标志,它可以是随便输入的字符串。

上传协议解析

 结果验证


 

猜你喜欢

转载自gaojingsong.iteye.com/blog/2414484
今日推荐