Servlet上传文件源码理解,不用控件,帮助你理解 (对请求头的解析)
2009-04-07 09:54
519 查看
POST / HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/msword, */*
Accept-Language: zh-cn
//根据下行,解析出boundary
Content-Type: multipart/form-data; boundary=---------------------------7d938a910702
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; InfoPath.2; CIBA)
Host: localhost:10102
Content-Length: 237
Connection: Keep-Alive
Cache-Control: no-cache
-----------------------------7d938a910702
根据boundary得到各个域的标记,分别处理
Content-Disposition: form-data; name="name"
浮士德
-----------------------------7d938a910702
Content-Disposition: form-data; name="pwd"
sdf
-----------------------------7d938a910702--
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/msword, */*
Accept-Language: zh-cn
//根据下行,解析出boundary
Content-Type: multipart/form-data; boundary=---------------------------7d938a910702
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; InfoPath.2; CIBA)
Host: localhost:10102
Content-Length: 237
Connection: Keep-Alive
Cache-Control: no-cache
-----------------------------7d938a910702
根据boundary得到各个域的标记,分别处理
Content-Disposition: form-data; name="name"
浮士德
-----------------------------7d938a910702
Content-Disposition: form-data; name="pwd"
sdf
-----------------------------7d938a910702--
相关文章推荐
- Servlet上传文件源码,不用控件,帮助你理解
- Servlet上传文件详细解析以及注意事项
- Java后台模拟向Servlet发送POST文件上传请求(转载)
- kindeditor上传文件在SpringMVC中servletFileUpload.parseRequest(request)解析为空获取不到数据问题 .
- 深入springMVC------文件上传源码解析(上篇)
- Servlet上传文件详细解析以及注意事项
- Servlet上传文件详细解析以及注意事项
- 深入springMVC------文件上传源码解析(上篇) 最近在项目中,使用springmvc 进行上传文件时,出现了一个问题: org.springframework.web.multipart
- 怎么做个IE控件实现文件上传,而不用“浏览”这类的控件呢
- Servlet上传文件详细解析以及注意事项
- Retrofit2 源码解析 理解原理能帮助我们更好的使用框架
- 百度多文件异步上传控件webuploader基本用法解析
- OkHttp上传文件,服务器端请求解析找不到文件信息的问题
- Spring MVC 4使用Servlet 3 MultiPartConfigElement实现文件上传(带源码)
- 深入springMVC源码------文件上传源码解析(下篇)
- 以Base64字符串形式上传文件——服务器端Java/Servlet接受请求数据中的字符串内容并转换成文件
- java基于servlet实现文件上传功能解析
- 深入springMVC源码------文件上传源码解析(下篇)
- 安卓客户端请求servlet上传文件的方法
- struts2上传文件ServletFileUpload解析request为空的三种解决方案