- 浏览: 2678944 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
80后的童年2:
深入浅出MongoDB应用实战开发网盘地址:https://p ...
MongoDB入门教程 -
shliujing:
楼主在不是精通java和php的前提下,请不要妄下结论。
PHP、CakePHP哪凉快哪呆着去 -
安静听歌:
希望可以一给一点点注释
MySQL存储过程之代码块、条件控制、迭代 -
qq287767957:
PHP是全宇宙最强的语言!
PHP、CakePHP哪凉快哪呆着去 -
rryymmoK:
深入浅出MongoDB应用实战开发百度网盘下载:链接:http ...
MongoDB入门教程
Message Types
HTTP-message = Request | Response ; HTTP/1.1 messages
HTTP messages consist of requests from client to server and responses from server to client
Request and Response messages use the generic message format of RFC 822 for transferring entities
generic-message = start-line
*(message-header CRLF)
CRLF
[ message-body ]
start-line = Request-Line | Status-Line
In the interest of robustness, servers SHOULD ignore any empty line(s) received where a Request-Line is expected
HTTP/1.1 client MUST NOT preface or follow a request with an extra CRLF
Message Headers
message-header = field-name ":" [ field-value ]
field-name = token
field-value = *( field-content | LWS )
field-content = <the OCTETs making up the field-value
and consisting of either *TEXT or combinations
of token, separators, and quoted-string>
HTTP header fields, which include general-header, request-header, response-header, and entity-header fields, follow the same generic format as that given in Section 3.1 of RFC 822
Each header field consists of a name followed by a colon (":") and the field value
Message Body
message-body = entity-body
| <entity-body encoded as per Transfer-Encoding>
The message-body (if any) of an HTTP message is used to carry the entity-body associated with the request or response
The message-body differs from the entity-body only when a transfer-coding has been applied, as indicated by the Transfer-Encoding header field
Transfer-Encoding is a property of the message, not of the entity, and thus MAY be added or removed by any application along the request/response chain
A message-body MUST NOT be included in a request if the specification of the request method does not allow sending an entity-body in requests
For response messages, whether or not a message-body is included with a message is dependent on both the request method and the response status code
All responses to the HEAD request method MUST NOT include a message-body, even though the presence of entity-header fields might lead one to believe they do
All 1xx (informational), 204 (no content), and 304 (not modified) responses MUST NOT include a message-body
All other responses do include a message-body, although it MAY be of zero length.
Message Length
The transfer-length of a message is the length of the message-body as it appears in the message after any transfer-codings have been applied
If a request contains a message-body and a Content-Length is not given, the server SHOULD respond with 400 (bad request) if it cannot determine the length of the message, or with 411 (length required) if it wishes to insist on receiving a valid Content-Length
Messages MUST NOT include both a Content-Length header field and a non-identity transfer-coding
If the message does include a non-identity transfer-coding, the Content-Length MUST be ignored
When a Content-Length is given in a message where a message-body is allowed, its field value MUST exactly match the number of OCTETs in the message-body
HTTP/1.1 user agents MUST notify the user when an invalid length is received and detected
General Header Fields
general-header = Cache-Control
| Connection
| Date
| Pragma
| Trailer
| Transfer-Encoding
| Upgrade
| Via
| Warning
New or experimental header fields may be given the semantics of general header fields if all parties in the communication recognize them to be general-header fields
Unrecognized header fields are treated as entity-header fields
Example
可以看到Message Header和Message Body之间有一个CRLF
HTTP-message = Request | Response ; HTTP/1.1 messages
HTTP messages consist of requests from client to server and responses from server to client
Request and Response messages use the generic message format of RFC 822 for transferring entities
generic-message = start-line
*(message-header CRLF)
CRLF
[ message-body ]
start-line = Request-Line | Status-Line
In the interest of robustness, servers SHOULD ignore any empty line(s) received where a Request-Line is expected
HTTP/1.1 client MUST NOT preface or follow a request with an extra CRLF
Message Headers
message-header = field-name ":" [ field-value ]
field-name = token
field-value = *( field-content | LWS )
field-content = <the OCTETs making up the field-value
and consisting of either *TEXT or combinations
of token, separators, and quoted-string>
HTTP header fields, which include general-header, request-header, response-header, and entity-header fields, follow the same generic format as that given in Section 3.1 of RFC 822
Each header field consists of a name followed by a colon (":") and the field value
Message Body
message-body = entity-body
| <entity-body encoded as per Transfer-Encoding>
The message-body (if any) of an HTTP message is used to carry the entity-body associated with the request or response
The message-body differs from the entity-body only when a transfer-coding has been applied, as indicated by the Transfer-Encoding header field
Transfer-Encoding is a property of the message, not of the entity, and thus MAY be added or removed by any application along the request/response chain
A message-body MUST NOT be included in a request if the specification of the request method does not allow sending an entity-body in requests
For response messages, whether or not a message-body is included with a message is dependent on both the request method and the response status code
All responses to the HEAD request method MUST NOT include a message-body, even though the presence of entity-header fields might lead one to believe they do
All 1xx (informational), 204 (no content), and 304 (not modified) responses MUST NOT include a message-body
All other responses do include a message-body, although it MAY be of zero length.
Message Length
The transfer-length of a message is the length of the message-body as it appears in the message after any transfer-codings have been applied
If a request contains a message-body and a Content-Length is not given, the server SHOULD respond with 400 (bad request) if it cannot determine the length of the message, or with 411 (length required) if it wishes to insist on receiving a valid Content-Length
Messages MUST NOT include both a Content-Length header field and a non-identity transfer-coding
If the message does include a non-identity transfer-coding, the Content-Length MUST be ignored
When a Content-Length is given in a message where a message-body is allowed, its field value MUST exactly match the number of OCTETs in the message-body
HTTP/1.1 user agents MUST notify the user when an invalid length is received and detected
General Header Fields
general-header = Cache-Control
| Connection
| Date
| Pragma
| Trailer
| Transfer-Encoding
| Upgrade
| Via
| Warning
New or experimental header fields may be given the semantics of general header fields if all parties in the communication recognize them to be general-header fields
Unrecognized header fields are treated as entity-header fields
Example
D:\projects\maui>curl -i http://www.baidu.com HTTP/1.1 200 OK Date: Fri, 26 Dec 2008 02:54:34 GMT Server: BWS/1.0 Content-Length: 4064 Content-Type: text/html Cache-Control: private Expires: Fri, 26 Dec 2008 02:54:34 GMT Set-Cookie: BAIDUID=8738C03034DA31AB6005581059479804:FG=1; expires=Fri, 26-Dec- 8 02:54:34 GMT; path=/; domain=.baidu.com P3P: CP=" OTI DSP COR IVA OUR IND COM " <html><head><meta http-equiv=Content-Type content="text/html;charset=gb2312"><ti tle>百度一下,你就知道 </title> ......
可以看到Message Header和Message Body之间有一个CRLF
发表评论
-
leveldb资料整理
2011-12-28 19:50 10809leveldb介绍 http://code.google.co ... -
HTTP Basic/Digest Authentication、OAuth
2009-01-09 14:01 9610HTTP Authentication au ... -
HTTP1.1 Notes 8, Header Field Definitions
2008-12-31 13:13 4449http://www.w3.org/Protocols/rfc ... -
HTTP1.1 Notes 7, Status Code Definitions
2008-12-30 15:01 3301Informational 1xx This class of ... -
HTTP1.1 Notes 6, Method Definitions
2008-12-30 12:30 2501Safe and Idempotent Methods In ... -
HTTP1.1 Notes 5, Connections
2008-12-29 13:25 2725Persistent Connections advantag ... -
HTTP1.1 Notes 4, Request & Response & Entity
2008-12-26 13:25 4192Request Request = ... -
HTTP1.1 Notes 2, Protocol Parameters
2008-12-24 13:12 2711HTTP Version HTTP-Versio ... -
HTTP1.1 Notes 1, Terminology & ABNF
2008-12-23 17:03 2830http://www.w3.org/Protocols/rfc ... -
以后都用MindManager做年度总结和年度计划
2008-12-19 19:54 60192008总结如下: 2009计划如下: 希望自己能够戒骄 ... -
Skip List 跳表
2008-12-19 15:54 5555跳表是个概率性的的数据结构,由William Pugh在199 ... -
数据仓库toolkit笔记1,Dimensional Modeling Primer
2008-12-15 18:49 2421数据仓库管理员的主要职责: 1,通过业务领域、工作职责和计算机 ... -
CLRS笔记15,动态规划
2008-12-10 18:14 1884动态规划算法的实质是分治思想和解决冗余,因此,动态规划是一种将 ... -
Web搜索引擎原理和技术
2008-12-08 12:06 4854主要的三个功能模块: ... -
CLRS笔记12,二叉查找树/红黑树
2008-12-04 17:32 2827二叉查找树 二叉查找树是一颗二叉树,并且每个节点x的左子树中所 ... -
CLRS笔记11,Hash Table
2008-12-03 15:02 2016Hash Table是实现动态集合在O(1)时间内的INSER ... -
CLRS笔记10、基本数据结构
2008-11-28 14:28 1906数学中的集合是不变的 ... -
CLRS笔记8,线性时间排序(counting、radix、bucket sort)
2008-11-27 11:13 3494线性时间排序即时间复杂度为Θ(n)的排序,主要有计数排序、基数 ... -
How to be Computer Game Developer?
2008-07-21 13:35 1266http://www.beyondrails.com/blog ... -
游戏引擎剖析
2008-07-21 11:59 2400转载一篇《游戏引擎剖析》系列,了解游戏引擎开发相关的知识。 ...
相关推荐
Coding custom error message and placement 226 Debug page #5: Another TemplateSyntaxError 229 Fixing the second TemplateSyntaxError 232 Summary 233 Chapter 8: When Problems Hide: Getting More ...
3. Update ACSCCID driver to v1.1.6.5. v1.1.2.0 (27/2/2010) 1. Update UI. 4. File Contents ---------------- | ReadMe.txt | Setup.exe | +---redist | InstMsiW.exe | \---x86 ACR38_100_122_PCSC_...
Notes Regarding Cascading Operations 11. Zend_Debug 11.1. 输出变量的值 (Dumping Variables) 12. Zend_Exception 12.1. 使用“异常” 13. Zend_Feed 13.1. 介绍 13.2. 导入Feeds 13.2.1. 定制 feeds ...
PEP 314: Metadata for Python Software Packages v1.1 PEP 328: Absolute and Relative Imports PEP 338: Executing Modules as Scripts PEP 341: Unified try/except/finally PEP 342: New Generator Features...
(Use the v1.1 rom as v1.0 will not work anymore). + Unicode font loads on a per-ROM basis - Default font is "kochi-mincho-subst.pcf" in /__aio/fonts directory, old unicode font removed (was 2x the ...
Section 1.1. Roadmap to the Book Section 1.2. What Type of Book Is This? Section 1.3. Terminology Section 1.4. Notation Section 1.5. Primer on Networking Section 1.6. Active vs. Passive ...
1.1 Reasons for Studying Concepts of Programming Languages 2 1.2 Programming Domains 5 1.3 Language Evaluation Criteria 7 1.4 Influences on Language Design 20 1.5 Language Categories 23 1.6 ...
你可以从http://info.internet.isi.edu/7c/in-notes/rfc/.cache找到下面提到的所有这些RFC规范。 RFC1738统一资源定位器(URL) RFC1808相关统一资源定位器 RFC1945超文本传输协议--HTTP/1.0 RFC2045多用途Internet...
它支持多种协议,包括SOAP 1.1、SOAP 1.2、REST、MTOM(Message Transmission Optimization Mechanism)和SwA(SOAP with Attachments)。 2. **axis2-1.4.1-bin.zip**:这个压缩包是Apache Axis2的二进制发行版,...
- **MTOM/XOP**:Message Transmission Optimization Mechanism和XML-binary Optimized Packaging是Axis2支持的优化机制,用于高效传输二进制数据,如图片或大文件。 - **部署和管理**:Axis提供了丰富的部署选项,...
Fixed : Issue with debug message in TTMSFMXGrid v1.8.0.5 Fixed : Issue with dblclick focusing issue in TTMSFMXGrid Improved : comment popup in cell configurable in TTMSFMXGridCell v1.8.0.6 ...
此外,Quectel_BC35-G-JB_Firmware_Release_Notes_V0106.pdf提供了BC35-G模块固件版本V0106的更新日志,包括新增功能、性能改进和已知问题修复等信息,这对于开发者来说是升级和维护设备时的重要参考。 最后,...
Section 1.1. "And Now for Something Completely Different" Section 1.2. The Life of Python Section 1.3. The Compulsory Features List Section 1.4. What's Python Good For? Section 1.5. What's ...
Struts is an MVC implementation that uses Servlets 2.2 and JSP 1.1 tags, from the J2EE specifications, as part of the implementation. You may never implement a system with Struts, but looking at ...
C CONSTABLE, 1992: OCCAM DISTRIBUTION NOTES. C C REVISION HISTORY: C MARCH 1986, (VERSION 1.2) C OCTOBER 1987, (VERSION 1.3) C AUGUST 1988, (VERSION 1.4) C JANUARY 1989 (WITH THANKS TO C.DEGROOT-...
Release Notes 完整版下载:http://www.oracle.com/technology/global/cn/software/products/sql/index.html 1. Known Issues 1.1 General - Print prints only one page that is a truncation of the current ...
LSIP200232870 (DFCT) Add a Gen2 to Gen3 toggle function and a check for the PCI speed to MegaSCU/CLI [ PR : LSIP200231423 ] LSIP200232927 (DFCT) Port PR 198414 to MR5.4 (Headless Boot) ...
NOTES ON MS-DOS VERSION 5.0 =========================== In this file the following topics are covered: 1. Introduction 2. Solving Setup Problems 2.1 Priam and Everex Hard Disks 2.2 SyQuest ...
Preface, Notes, Licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....