HTTP post multipart-form 数据长度格式?

标签 http post content-type

在 HTTP POST 多部分形式的内容类型流中,长 -------------- 行是什么意思?这些行末尾的十六进制编码是什么?你能从中算出变量的长度吗?或者这是一个特别设计的序列,以便您可以找到变量之间的中断?

-----------------------------7dc34719970524 
Content-Disposition: form-data; name="my variable" 

blah content here
-----------------------------7dc34719970524 
Content-Disposition: form-data; name="asdfasdf"

heaps of data here

最佳答案

它是一个边界,用于在多部分数据提交的情况下分隔不同的数据集。阅读更多相关信息:

http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html

引用链接:

In the case of multiple part messages, in which one or more different sets of data are combined in a single body, a "multipart" Content-Type field must appear in the entity's header. The body must then contain one or more "body parts," each preceded by an encapsulation boundary, and the last one followed by a closing boundary. Each part starts with an encapsulation boundary, and then contains a body part consisting of header area, a blank line, and a body area. Thus a body part is similar to an RFC 822 message in syntax, but different in meaning.

关于HTTP post multipart-form 数据长度格式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8936666/

相关文章:

java - AsyncHttpClient 是否知道为所有 HTTP 请求分配多少线程

javascript - 请求 HTTP 库很慢

android - PUT 在 OKHTTP 上失败

ruby-on-rails - Ruby 是否需要一个框架来接受 POST 请求?

objective-c - POST 与 NSURLConnection - 没有 JSON

德鲁帕尔 6 : Drupal Themer gives same candidate name for different type of content types

wcf - 是否可以为 WCF WebGet 方法设置 ContentType?

javascript - 如何防止 CasperJS 中的重定向?

Jquery 绑定(bind)到链接,执行一些 post jquery 然后加载链接

post - axios拦截器在401重试时更改POST请求的内容类型