Java#Servlet规范#HTTP Protocol Parameters
来源:互联网 发布:社交网络 肖恩帕克 编辑:程序博客网 时间:2024/06/08 03:47
Java#Servlet规范#HTTP Protocol Parameters
场景
异构系统服务调用,约定传递xml结构数据,服务逻辑使用getInputStream获取数据并进行逻辑处理,后续由于服务的统一入口逻辑变更增加request parameter操作造成传递的结构数据被安全过滤和转义,进而影响到后续服务逻辑处理。
原因
服务调用方传递的contentType为application/x-www-form-urlencoded依据servlet规则会自动组装到request parameter中。
Servlet规范约定了传递到Servlet的数据填充到request.getParameter集合的规则,在与异构系统通信时如果没有明确约束会增加很多调试沟通成本。
资料
一、servlet-2_4-fr-spec.pdf
二、SRV.4.1.1 When Parameters Are Available
The following are the conditions that must be met before post form data will be populated to the parameter set:
1. The request is anHTTP or HTTPS request.
2. The HTTP method is POST.
3. The content type is application/x-www-form-urlencoded.
4. The servlet has made an initial call of any of the getParameter family of methods on the request object.
If the conditions are not met and the post form data is not included in the parameter set, the post data must still be available to the servlet via the request object’s input stream. If the conditions are met, post form data will no longer be available for reading directly from the request object’s input stream.
- Java#Servlet规范#HTTP Protocol Parameters
- Java Servlet规范
- HTTP_1.1_ Protocol Parameters
- Java Servlet 3.0 规范草案
- 【Dongle】【Java】规范之Servlet
- BitTorrent协议规范(BitTorrent Protocol Specification)之Tracker HTTP/HTTPS Protocol-第三部分
- Java web- HTTP servlet
- Servlet 规范笔记—基于http协议的servlet
- http protocol
- http protocol
- HTTP Protocol
- Http Protocol
- http protocol
- Real-Time Transport Protocol (RTP) Parameters
- Internet Control Message Protocol (ICMP) Parameters
- Dynamic Host Configuration Protocol (DHCP) and Bootstrap Protocol (BOOTP) Parameters
- BT Protocol 规范1.0
- Protocol Buffer协议规范
- jQuery删除和清空节点
- Android SQLite的基本操作
- POJ-1837 Balance
- C 位操作
- C#字节数组操作
- Java#Servlet规范#HTTP Protocol Parameters
- 进程处理例子
- HIVE入门
- picasso的简单用法
- 为什么在项目中使用Using namespace CocosDenshion;会提示出错expected namespace namespace
- 背景建模--高斯混合模型
- Picasso入门教程(九)回调,remoteViews,通知
- 第十五周项目—阅读程序(3)
- Oracle ADF 11g后台常用方法(2)