关于 Content-Type:application/x-www-form-urlencoded 和 Content-Type:multipart/related
来源:互联网 发布:尘埃2 windows live 编辑:程序博客网 时间:2024/06/04 17:53
最近项目中用到的一个是用一个页面接收c程序post过来的一断字符串..总接收不到值...
我用C#写一个测试可以正常接收到值.
最后抓包比较
区别只是Content-Type:application/x-www-form-urlencoded 和 Content-Type:multipart/related
查资料得:
application/x-www-form-urlencoded: 窗体数据被编码为名称/值对。这是标准的编码格式。 multipart/form-data: 窗体数据被编码为一条消息,页上的每个控件对应消息中的一个部分。 text/plain: 窗体数据以纯文本形式进行编码,其中不含任何控件或格式字符。
补充
form的enctype属性为编码方式,常用有两种:application/x-www-form-urlencoded和multipart/form-data,默认为application/x-www-form-urlencoded。 当action为get时候,浏览器用x-www-form-urlencoded的编码方式把form数据转换成一个字串(name1=value1&name2=value2...),然后把这个字串append到url后面,用?分割,加载这个新的url。 当action为post时候,浏览器把form数据封装到http body中,然后发送到server。 如果没有type=file的控件,用默认的application/x-www-form-urlencoded就可以了。 但是如果有type=file的话,就要用到multipart/form-data了。浏览器会把整个表单以控件为单位分割,并为每个部分加上Content-Disposition(form-data或者file),Content-Type(默认为text/plain),name(控件name)等信息,并加上分割符(boundary)。
autocomplete="on"
input 的属性autocomplete 默认为on其含义代表是否让浏览器自动记录之前输入的值很多时候,需要对客户的资料进行保密,防止浏览器软件或者恶意插件获取到可以在input中加入autocomplete="off" 来关闭记录 系统需要保密的情况下可以使用此参数
- 关于 Content-Type:application/x-www-form-urlencoded 和 Content-Type:multipart/related
- 关于 Content-Type:application/x-www-form-urlencoded 和 Content-Type:multipart/related
- 关于 Content-Type:application/x-www-form-urlencoded 和 Content-Type:multipart/related
- 关于 Content-Type:application/x-www-form-urlencoded 和 Content-Type:multipart/related
- 关于 Content-Type:application/x-www-form-urlencoded 和 Content-Type:multipart/related
- 关于 Content-Type:application/x-www-form-urlencoded 和 Content-Type:multipart/related
- 关于 Content-Type:application/x-www-form-urlencoded 和 Content-Type:multipart/related
- 关于 Content-Type:application/x-www-form-urlencoded 和 Content-Type:multipart/related
- 关于 Content-Type:application/x-www-form-urlencoded 和 Content-Type:multipart/rel (2
- Content-Type的application/x-www-form-urlencoded和multipart/related
- Content-Type:application/x-www-form-urlencoded 和 Content-Type:multipart/rel
- Content-Type:application/x-www-form-urlencoded 和 multipart/form-data
- Content-Type: application/x-www-form-urlencoded
- 关于Content-Type中application/x-www-form-urlencoded 和 multipart/form-data的区别及用法
- 关于 Content-Type:application/x-www-form-urlencoded
- [转]Content-Type: application/x-www-form-urlencoded
- Content-Type: application/x-www-form-urlencoded什么意思
- Form content types(表单内容类型)--application/x-www-form-urlencoded和multipart/form-data
- mysql常用基本命令
- Ant_Ant批量打包android应用
- 电脑里同时安装多个版本的JDK可能出现的问题
- 类和函数
- 走得太快的人
- 关于 Content-Type:application/x-www-form-urlencoded 和 Content-Type:multipart/related
- oralce中init.ora配置详细信息
- 内存溢出和内存泄漏的区别
- 类 函数 输出时间
- 实用设计模式之观察者模式
- Visual C++ 6.0安装文件
- Android学习笔记之AndroidManifest.xml文件解析
- 用含成员函数的类输出时间
- 显存与纹理内存详解 .