简体   繁体   English

HTTP帖子标题格式,是否有尾随内容?

[英]HTTP Post Headers Format, Any trailing content?

When you receive a post request from a client, do you get any headers after the params ? 当您收到来自客户的发帖请求时,是否在params之后得到了任何标题?

Take this request for example: 以这个请求为例:

POST /path/script.cgi HTTP/1.0
From: frog@jmarshall.com
User-Agent: HTTPTool/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 32

home=Cosby&favorite+flavor=flies

If there are any other headers sent for any reason, would any ever appear after the parameters of the post content? 如果由于某种原因发送了其他任何标题,那么在帖子内容的参数后面会出现任何标题吗?

I am trying to figure out how to iterate post data with Java 我试图弄清楚如何使用Java迭代发布数据

For Chunked Trailer Part , the answer is Yes. 对于“ Chunked Trailer Part ,答案是“是”。 In your case, the HTTP request is not chunked, so I guess the answer would be No. 在您的情况下,HTTP请求未分块,因此我猜答案为否。

According to RFC7230 : 根据RFC7230

A trailer allows the sender to include additional fields at the end of a chunked message in order to supply metadata that might be dynamically generated while the message body is sent, such as a message integrity check, digital signature, or post-processing status. 尾部允许发送方在分块消息的末尾包括其他字段,以提供在发送消息正文时可能动态生成的元数据,例如消息完整性检查,数字签名或后处理状态。 The trailer fields are identical to header fields, except they are sent in a chunked trailer instead of the message's header section. 尾部字段与标头字段相同,除了它们以分块尾部而不是消息的标头部分发送。

The structure is: 结构为:

trailer-part   = *( header-field CRLF )

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM