`
hideto
  • 浏览: 2678821 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

HTTP1.1 Notes 2, Protocol Parameters

阅读更多
HTTP Version
       HTTP-Version   = "HTTP" "/" 1*DIGIT "." 1*DIGIT

Uniform Resource Identifiers
As far as HTTP is concerned, Uniform Resource Identifiers are simply formatted strings which identify--via name, location, or any other characteristic--a resource.

       http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]

If the port is empty or not given, port 80 is assumed.

A server SHOULD return 414 (Request-URI Too Long) status if a URI is longer than the server can handle

If the abs_path is not present in the URL, it MUST be given as "/" when used as a Request-URI for a resource

URI Comparison:
  - A port that is empty or not given is equivalent to the default port for that URI-reference;
  - Comparisons of host names MUST be case-insensitive;
  - Comparisons of scheme names MUST be case-insensitive;
  - An empty abs_path is equivalent to an abs_path of "/".

Characters other than those in the "reserved" and "unsafe" sets (RFC 2396) are equivalent to their ""%" HEX HEX" encoding.

       escaped     = "%" hex hex
       hex         = digit | "A" | "B" | "C" | "D" | "E" | "F" |
                            "a" | "b" | "c" | "d" | "e" | "f"

Date/Time Formats
Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 822, updated by RFC 1123
Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format

HTTP/1.1 clients and servers that parse the date value MUST accept all three formats (for compatibility with HTTP/1.0), though they MUST only generate the RFC 1123 format for representing HTTP-date values in header fields.

All HTTP date/time stamps MUST be represented in Greenwich Mean Time (GMT), without exception.

       HTTP-date    = rfc1123-date | rfc850-date | asctime-date
       rfc1123-date = wkday "," SP date1 SP time SP "GMT"
       rfc850-date  = weekday "," SP date2 SP time SP "GMT"
       asctime-date = wkday SP date3 SP time SP 4DIGIT
       date1        = 2DIGIT SP month SP 4DIGIT
                      ; day month year (e.g., 02 Jun 1982)
       date2        = 2DIGIT "-" month "-" 2DIGIT
                      ; day-month-year (e.g., 02-Jun-82)
       date3        = month SP ( 2DIGIT | ( SP 1DIGIT ))
                      ; month day (e.g., Jun  2)
       time         = 2DIGIT ":" 2DIGIT ":" 2DIGIT
                      ; 00:00:00 - 23:59:59
       wkday        = "Mon" | "Tue" | "Wed"
                    | "Thu" | "Fri" | "Sat" | "Sun"
       weekday      = "Monday" | "Tuesday" | "Wednesday"
                    | "Thursday" | "Friday" | "Saturday" | "Sunday"
       month        = "Jan" | "Feb" | "Mar" | "Apr"
                    | "May" | "Jun" | "Jul" | "Aug"
                    | "Sep" | "Oct" | "Nov" | "Dec"

       delta-seconds  = 1*DIGIT

Character Sets
       charset = token

HTTP character sets are identified by case-insensitive tokens
The complete set of tokens is defined by the IANA Character Set registry

Content Codings
       content-coding   = token

All content-coding values are case-insensitive
HTTP/1.1 uses content-coding values in the Accept-Encoding and Content-Encoding header fields.

The Internet Assigned Numbers Authority (IANA) acts as a registry for content-coding value tokens. Initially, the registry contains the following tokens:
gzip
compress
deflate
identity(default encoding, use no transformation)

Transfer Codings
       transfer-coding         = "chunked" | transfer-extension
       transfer-extension      = token *( ";" parameter )

Transfer-coding values are used to indicate an encoding transformation that has been, can be, or may need to be applied to an entity-body in order to ensure "safe transport" through the network.
This differs from a content coding in that the transfer-coding is a property of the message, not of the original entity.
All transfer-coding values are case-insensitive. HTTP/1.1 uses transfer-coding values in the TE header field and in the Transfer-Encoding header field

The Internet Assigned Numbers Authority (IANA) acts as a registry for transfer-coding value tokens. Initially, the registry contains the following tokens:
chunked
identity
gzip
compress
deflate

A server which receives an entity-body with a transfer-coding it does not understand SHOULD return 501 (Unimplemented), and close the connection.

Media Types
       media-type     = type "/" subtype *( ";" parameter )
       type           = token
       subtype        = token

The type, subtype, and parameter attribute names are case- insensitive.
Linear white space (LWS) MUST NOT be used between the type and subtype, nor between an attribute and its value.

Note: The "multipart/form-data" type has been specifically defined
      for carrying form data suitable for processing via the POST
      request method, as described in RFC 1867

Product Tokens
       product         = token ["/" product-version]
       product-version = token

Examples:

       User-Agent: CERN-LineMode/2.15 libwww/2.17b3
       Server: Apache/0.8.4

Quality Values
       qvalue         = ( "0" [ "." 0*3DIGIT ] )
                      | ( "1" [ "." 0*3("0") ] )

HTTP content negotiation uses short "floating point" numbers to indicate the relative importance ("weight") of various negotiable parameters.
A weight is normalized to a real number in the range 0 through 1, where 0 is the minimum and 1 the maximum value.
If a parameter has a quality value of 0, then content with this parameter is `not acceptable' for the client.

Language Tags
        language-tag  = primary-tag *( "-" subtag )
        primary-tag   = 1*8ALPHA
        subtag        = 1*8ALPHA
A language tag identifies a natural language spoken, written, or otherwise conveyed by human beings for communication of information to other human beings.
HTTP uses language tags within the Accept-Language and Content- Language fields.
Example:
en, en-US, en-cockney, i-cherokee, x-pig-latin

Entity Tags
      entity-tag = [ weak ] opaque-tag
      weak       = "W/"
      opaque-tag = quoted-string
Entity tags are used for comparing two or more entities from the same requested resource.
HTTP/1.1 uses entity tags in the ETag , If-Match , If-None-Match , and If-Range header fields.


Range Utils
      range-unit       = bytes-unit | other-range-unit
      bytes-unit       = "bytes"
      other-range-unit = token

HTTP/1.1 allows a client to request that only part (a range of) the response entity be included within the response.
HTTP/1.1 uses range units in the Range and Content-Range header fields.


上一个百度的例子:
D:\projects\maui>curl -I http://www.baidu.com
HTTP/1.1 200 OK
Date: Wed, 24 Dec 2008 05:13:25 GMT
Server: BWS/1.0
Content-Length: 4064
Content-Type: text/html
Cache-Control: private
Expires: Wed, 24 Dec 2008 05:13:25 GMT
Set-Cookie: BAIDUID=C836D6EC630FBFE49ABAD74F7F62D2E1:FG=1; expires=Wed, 24-Dec-3
8 05:13:25 GMT; path=/; domain=.baidu.com
P3P: CP=" OTI DSP COR IVA OUR IND COM "
分享到:
评论

相关推荐

    SideNotes-1.1.zip sidenotes: 1.1 一个用于记笔记的智能应用程序

    我们刚刚发布了SideNotes 1.1。它带来了许多新功能和改进。我们非常感谢出色的用户提出的大多数建议。  搜索便笺和文件夹  档案捷径  分享扩展  菜单栏图标  将笔记移到其他文件夹  在启动时运行  ...

    notes2 --notes2

    notes2 notes2notes2 notes2notes2 notes2v

    Azure_AD_PowerShell_Version_1.1.166.0_GA_Release_Notes_V2

    2. **Set-MsolCompanyMultiNationalEnabled** - 用途:此命令用于启用或禁用组织的跨国支持功能。当启用后,组织可以更灵活地在全球范围内管理和配置资源。 - 使用场景:对于拥有全球业务的企业来说,启用此功能...

    jKill#basic-notes#简述 HTTP 1.0,1.1,2.0 的主要区别1

    1.1支持长连接(Persistent connections) 1.1支持分块编码(chunked-encoding) 1.1支持缓存 1.1支持压缩和解压缩

    2.Database Release Notes

    Oracle Database 11g Release 2(11.2)是Oracle公司发布的数据库版本,其官方安装文档提供了详细的信息,适合新手和经验丰富的数据库管理员使用。这些文档被称作Release Notes,包含了很多重要信息,这些信息在特定...

    commons-logging-1.1

    5. **更改日志**(`CHANGES.txt`或`RELEASE-NOTES.txt`):记录了自上一版本以来的改进、修复和新功能,对于了解版本间的差异和升级决策很有帮助。 6. **示例代码**:可能包含演示如何使用Commons Logging的示例...

    windows 手动安装Sticky Notes 便签.zip

    2、拷贝 en-US、slc.dll、StickyNotes.exe 至 C:\Program Files\Sticky Notes; 3、拷贝 .\System32\SNTSearch.dll 至 C:\Windows\System32; 4、拷贝 .System32\en-US\sntsearch.dll.mui 至 C:\Windows\System32\...

    Notes SQL 8.5.1用于odbc连接Lotus Notes数据库

    Lotus Notes是一款强大的企业级协作应用软件,而SQL(Structured Query Language)是用于管理和处理关系数据库的标准语言。在标题和描述中提到的“Notes SQL 8.5.1”是IBM提供的一款工具,它允许开发者通过ODBC...

    CFA2 Book1 Notes

    2019 CFA2 第一本 Schweser Notes Ethics, Quantitative, Econ

    HTTP-TFTP-V1.1.rar_HTTP_IAP HTTP_IAP STM32 Ethernet_TFTP iap_ht

    标题中的"HTTP-TFTP-V1.1.rar"指的是一个压缩包文件,包含了HTTP和TFTP协议的实现,用于STM32F107微控制器的IAP(In-Application Programming)固件升级。IAP是一种在应用中更新程序存储器的技术,允许用户在设备...

    网件 NETGEAR R6800 固件 V1.1.0.42_1.0.1(多国语言版)

    - 如果遇到问题,可查阅官方提供的“Release Notes”(R6800-V1.1.0.42_1.0.1_Release_Notes.html)文件,了解详细变更日志和升级指南。 总的来说,网件(NETGEAR)R6800固件V1.1.0.42_1.0.1的更新旨在提高设备的...

    Lotus Notes 24学时教程part2

    在"Lotus Notes 24学时教程part2"中,我们可以深入学习这款软件的高级特性和实际应用技巧。 在第一部分的教程中,我们可能已经了解了基础操作,如安装和设置Lotus Notes客户端,创建和管理邮件,以及基础的日历和...

    如何改变LotusNotes 工作区字体的大小

    2. **重启LotusNotes**:关闭当前运行的LotusNotes程序,并重新启动它以便应用新的字体设置。 ### 其他注意事项 - **备份`notes.ini`文件**:在对`notes.ini`文件进行任何修改之前,建议先创建一个备份副本,...

    IBM LotusNotes JAVA库 NCSO.jar Notes.jar

    2. **Notes.jar**:这是LotusNotes的主要Java库,包含了大量用于访问和操作Notes/Domino数据的类。这些类涵盖了从打开数据库、创建文档、更新字段、读取视图到触发服务器端代理等所有功能。开发者可以通过这些类直接...

    notes 8.5 新功能详解

    ### Notes 8.5 新功能详解 #### 一、读信更智能 在Notes 8.5中,读取电子邮件变得更加智能化。用户可以通过多种方式快速识别和管理邮件,提高工作效率。 **具体功能介绍:** - **按颜色区分发件人**:通过设置...

    火热!!cfa一级2024最新notes下载

    2. **CFA 2024 Level I - SchweserNotes Book 2**:可能涉及定量方法、经济学等内容。 3. **CFA 2024 Level I - SchweserNotes Book 3**:涵盖公司金融、权益投资等主题。 4. **CFA 2024 Level I - Schweser Quick...

    学习notes2学习notes2

    学习notes2学习notes2学习notes2学习notes2学习notes2

    Notes模板,适合于notes初学者!

    Notes模板详解 Notes是一款功能强大且灵活的协作软件,但许多用户并不了解Notes的模板机制和数据库结构,导致在使用Notes时遇到很多问题。今天,我们将详细介绍Notes模板的概念、创建模板的方法、模板的应用场景,...

    如何设置Lotus Notes收发Internet邮件

    #### 2. 配置邮件服务器地址 接下来,用户需输入邮件服务商提供的POP或IMAP服务器地址,以及SMTP(Simple Mail Transfer Protocol)服务器地址。这些信息通常可以在邮件服务提供商的网站上找到,或者在用户注册账户...

Global site tag (gtag.js) - Google Analytics