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

HTTP1.1 Notes 8, Header Field Definitions

阅读更多
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14

Accept
The Accept request-header field can be used to specify certain media types which are acceptable for the response

       Accept         = "Accept" ":"
                        #( media-range [ accept-params ] )

       media-range    = ( "*/*"
                        | ( type "/" "*" )
                        | ( type "/" subtype )
                        ) *( ";" parameter )
       accept-params  = ";" "q" "=" qvalue *( accept-extension )
       accept-extension = ";" token [ "=" ( token | quoted-string ) ]

Accept-Charset
The Accept-Charset request-header field can be used to indicate what character sets are acceptable for the response

      Accept-Charset = "Accept-Charset" ":"
              1#( ( charset | "*" )[ ";" "q" "=" qvalue ] )

Accept-Encoding
The Accept-Encoding request-header field is similar to Accept, but restricts the content-codings that are acceptable in the response

       Accept-Encoding  = "Accept-Encoding" ":"

                          1#( codings [ ";" "q" "=" qvalue ] )
       codings          = ( content-coding | "*" )

Accept-Language
The Accept-Language request-header field is similar to Accept, but restricts the set of natural languages that are preferred as a response to the request

       Accept-Language = "Accept-Language" ":"
                         1#( language-range [ ";" "q" "=" qvalue ] )
       language-range  = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" )

Accept-Ranges
The Accept-Ranges response-header field allows the server to indicate its acceptance of range requests for a resource

          Accept-Ranges     = "Accept-Ranges" ":" acceptable-ranges
          acceptable-ranges = 1#range-unit | "none"

Age
The Age response-header field conveys the sender's estimate of the amount of time since the response (or its revalidation) was generated at the origin server

           Age = "Age" ":" age-value
           age-value = delta-seconds

Allow
The Allow entity-header field lists the set of methods supported by the resource identified by the Request-URI

           Allow   = "Allow" ":" #Method

Authorization
A user agent that wishes to authenticate itself with a server--usually, but not necessarily, after receiving a 401 response--does so by including an Authorization request-header field with the request

          Authorization  = "Authorization" ":" credentials

Cache-Control
The Cache-Control general-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain

    Cache-Control   = "Cache-Control" ":" 1#cache-directive

    cache-directive = cache-request-directive
         | cache-response-directive

    cache-request-directive =
           "no-cache"                         
         | "no-store"                         
         | "max-age" "=" delta-seconds        
         | "max-stale" [ "=" delta-seconds ]  
         | "min-fresh" "=" delta-seconds      
         | "no-transform"                     
         | "only-if-cached"                   
         | cache-extension                    

     cache-response-directive =
           "public"                              
         | "private" [ "=" <"> 1#field-name <"> ]
         | "no-cache" [ "=" <"> 1#field-name <"> ]
         | "no-store"                            
         | "no-transform"                        
         | "must-revalidate"                     
         | "proxy-revalidate"                    
         | "max-age" "=" delta-seconds           
         | "s-maxage" "=" delta-seconds          
         | cache-extension                       

    cache-extension = token [ "=" ( token | quoted-string ) ]

Connection
The Connection general-header field allows the sender to specify options that are desired for that particular connection and MUST NOT be communicated by proxies over further connections

       Connection = "Connection" ":" 1#(connection-token)
       connection-token  = token

Content-Encoding
The Content-Encoding entity-header field is used as a modifier to the media-type

       Content-Encoding  = "Content-Encoding" ":" 1#content-coding

Content-Language
The Content-Language entity-header field describes the natural language(s) of the intended audience for the enclosed entity

       Content-Language  = "Content-Language" ":" 1#language-tag

Content-Length
The Content-Length entity-header field indicates the size of the entity-body, in decimal number of OCTETs, sent to the recipient or, in the case of the HEAD method, the size of the entity-body that would have been sent had the request been a GET

       Content-Length    = "Content-Length" ":" 1*DIGIT

Content-Location
The Content-Location entity-header field MAY be used to supply the resource location for the entity enclosed in the message when that entity is accessible from a location separate from the requested resource's URI

       Content-Location = "Content-Location" ":"
                         ( absoluteURI | relativeURI )

Content-MD5
The Content-MD5 entity-header field, as defined in RFC 1864 [23], is an MD5 digest of the entity-body for the purpose of providing an end-to-end message integrity check (MIC) of the entity-body

        Content-MD5   = "Content-MD5" ":" md5-digest
        md5-digest   = <base64 of 128 bit MD5 digest as per RFC 1864>

Content-Range
The Content-Range entity-header is sent with a partial entity-body to specify where in the full entity-body the partial body should be applied

       Content-Range = "Content-Range" ":" content-range-spec

       content-range-spec      = byte-content-range-spec
       byte-content-range-spec = bytes-unit SP
                                 byte-range-resp-spec "/"
                                 ( instance-length | "*" )

       byte-range-resp-spec = (first-byte-pos "-" last-byte-pos)
                                      | "*"
       instance-length           = 1*DIGIT

Content-Type
The Content-Type entity-header field indicates the media type of the entity-body sent to the recipient or, in the case of the HEAD method, the media type that would have been sent had the request been a GET

       Content-Type   = "Content-Type" ":" media-type

Date
The Date general-header field represents the date and time at which the message was originated, having the same semantics as orig-date in RFC 822

       Date  = "Date" ":" HTTP-date

ETag
The ETag response-header field provides the current value of the entity tag for the requested variant

      ETag = "ETag" ":" entity-tag

Expect
The Expect request-header field is used to indicate that particular server behaviors are required by the client

      Expect       =  "Expect" ":" 1#expectation

      expectation  =  "100-continue" | expectation-extension
      expectation-extension =  token [ "=" ( token | quoted-string )
                               *expect-params ]
      expect-params =  ";" token [ "=" ( token | quoted-string ) ]

Expires
The Expires entity-header field gives the date/time after which the response is considered stale

      Expires = "Expires" ":" HTTP-date

From
The From request-header field, if given, SHOULD contain an Internet e-mail address for the human user who controls the requesting user agent

       From   = "From" ":" mailbox

Host
The Host request-header field specifies the Internet host and port number of the resource being requested, as obtained from the original URI given by the user or referring resource

       Host = "Host" ":" host [ ":" port ]

If-Match
The If-Match request-header field is used with a method to make it conditional

       If-Match = "If-Match" ":" ( "*" | 1#entity-tag )

If-Modified-Since
The If-Modified-Since request-header field is used with a method to make it conditional: if the requested variant has not been modified since the time specified in this field, an entity will not be returned from the server; instead, a 304 (not modified) response will be returned without any message-body

       If-Modified-Since = "If-Modified-Since" ":" HTTP-date

If-None-Match
The If-None-Match request-header field is used with a method to make it conditional

       If-None-Match = "If-None-Match" ":" ( "*" | 1#entity-tag )

If-Range
If a client has a partial copy of an entity in its cache, and wishes to have an up-to-date copy of the entire entity in its cache, it could use the Range request-header with a conditional GET

        If-Range = "If-Range" ":" ( entity-tag | HTTP-date )

If-Unmodified-Since
The If-Unmodified-Since request-header field is used with a method to make it conditional

      If-Unmodified-Since = "If-Unmodified-Since" ":" HTTP-date

Last-Modified
The Last-Modified entity-header field indicates the date and time at which the origin server believes the variant was last modified

       Last-Modified  = "Last-Modified" ":" HTTP-date

Location
The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource

       Location       = "Location" ":" absoluteURI

Max-Forwards
The Max-Forwards request-header field provides a mechanism with the TRACE and OPTIONS methods to limit the number of proxies or gateways that can forward the request to the next inbound server

       Max-Forwards   = "Max-Forwards" ":" 1*DIGIT

Pragma
The Pragma general-header field is used to include implementation- specific directives that might apply to any recipient along the request/response chain

       Pragma            = "Pragma" ":" 1#pragma-directive
       pragma-directive  = "no-cache" | extension-pragma
       extension-pragma  = token [ "=" ( token | quoted-string ) ]

Proxy-Authenticate
The Proxy-Authenticate response-header field MUST be included as part of a 407 (Proxy Authentication Required) response

       Proxy-Authenticate  = "Proxy-Authenticate" ":" 1#challenge

Proxy-Authorization
The Proxy-Authorization request-header field allows the client to identify itself (or its user) to a proxy which requires authentication

       Proxy-Authorization     = "Proxy-Authorization" ":" credentials

Range
HTTP retrieval requests using conditional or unconditional GET methods MAY request one or more sub-ranges of the entity, instead of the entire entity, using the Range request header, which applies to the entity returned as the result of the reques

       Range = "Range" ":" ranges-specifier
       ranges-specifier = byte-ranges-specifier
       byte-ranges-specifier = bytes-unit "=" byte-range-set
       byte-range-set  = 1#( byte-range-spec | suffix-byte-range-spec )
       byte-range-spec = first-byte-pos "-" [last-byte-pos]
       first-byte-pos  = 1*DIGIT
       last-byte-pos   = 1*DIGIT
       suffix-byte-range-spec = "-" suffix-length
       suffix-length = 1*DIGIT

Referer
The Referer[sic] request-header field allows the client to specify, for the server's benefit, the address (URI) of the resource from which the Request-URI was obtained

       Referer        = "Referer" ":" ( absoluteURI | relativeURI )

Retry-After
The Retry-After response-header field can be used with a 503 (Service Unavailable) response to indicate how long the service is expected to be unavailable to the requesting client

       Retry-After  = "Retry-After" ":" ( HTTP-date | delta-seconds )

Server
The Server response-header field contains information about the software used by the origin server to handle the request

       Server         = "Server" ":" 1*( product | comment )

TE
The TE request-header field indicates what extension transfer-codings it is willing to accept in the response and whether or not it is willing to accept trailer fields in a chunked transfer-coding

       TE        = "TE" ":" #( t-codings )
       t-codings = "trailers" | ( transfer-extension [ accept-params ] )

Trailer
The Trailer general field value indicates that the given set of header fields is present in the trailer of a message encoded with chunked transfer-coding

       Trailer  = "Trailer" ":" 1#field-name

Transfer-Encoding
The Transfer-Encoding general-header field indicates what (if any) type of transformation has been applied to the message body in order to safely transfer it between the sender and the recipient

     Transfer-Encoding       = "Transfer-Encoding" ":" 1#transfer-coding

Upgrade
The Upgrade general-header allows the client to specify what additional communication protocols it supports and would like to use if the server finds it appropriate to switch protocols

       Upgrade        = "Upgrade" ":" 1#product

User-Agent
The User-Agent request-header field contains information about the user agent originating the request

       User-Agent     = "User-Agent" ":" 1*( product | comment )

Vary
The Vary field value indicates the set of request-header fields that fully determines, while the response is fresh, whether a cache is permitted to use the response to reply to a subsequent request without revalidation

       Vary  = "Vary" ":" ( "*" | 1#field-name )

Via
The Via general-header field MUST be used by gateways and proxies to indicate the intermediate protocols and recipients between the user agent and the server on requests, and between the origin server and the client on responses

      Via =  "Via" ":" 1#( received-protocol received-by [ comment ] )
      received-protocol = [ protocol-name "/" ] protocol-version
      protocol-name     = token
      protocol-version  = token
      received-by       = ( host [ ":" port ] ) | pseudonym
      pseudonym         = token

Warning
The Warning general-header field is used to carry additional information about the status or transformation of a message which might not be reflected in the message

       Warning    = "Warning" ":" 1#warning-value

       warning-value = warn-code SP warn-agent SP warn-text
                                             [SP warn-date]

       warn-code  = 3DIGIT
       warn-agent = ( host [ ":" port ] ) | pseudonym
                       ; the name or pseudonym of the server adding
                       ; the Warning header, for use in debugging
       warn-text  = quoted-string
       warn-date  = <"> HTTP-date <">

WWW-Authenticate
The WWW-Authenticate response-header field MUST be included in 401 (Unauthorized) response messages

       WWW-Authenticate  = "WWW-Authenticate" ":" 1#challenge

太多了,足足47个header filed,细节以后遇到再来看吧
分享到:
评论

相关推荐

    Definitions 1.1.10.0.msi

    Definitions 1.1.10.0.msi

    下载 DVTK Definitions 1.1.10.0.msi

    标题中的“下载 DVTK Definitions 1.1.10.0.msi”表明这是一个软件安装程序,具体来说是DVTK(可能代表Data Validation Toolkit或类似的缩写)的定义文件版本1.1.10.0的MSI(Microsoft Installer)包。这个MSI文件是...

    UVM_1.1_Class_Reference_Final

    8. Phasing Classes 8.1 uvm_phase 8.2 uvm_domain 8.3 uvm_bottomup_phase 8.4 uvm_task_phase 8.5 uvm_topdown_phase 8.6 UVM Common Phases UVM 1.1 Class Reference Front-4 8.7 UVM Run-Time Phases...

    Python库 | sari-field-definitions-generator-0.1.2.tar.gz

    资源分类:Python库 所属语言:Python 资源全名:sari-field-definitions-generator-0.1.2.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059

    USB UVC协议文档,包括1.0、1.1、1.5版本

    2. **UVC 1.1**:这个版本通常是对1.0的增强,增加了对更多视频编码格式的支持,如VP8和H.265(HEVC)。此外,可能还包含了对设备功能的扩展,例如更高的分辨率和帧率,以及对多流传输的支持,允许同时传输多个不同...

    wsdl标准写法(含header)

    3. **绑定(`&lt;binding&gt;`)**:绑定定义了服务应该如何被调用,包括使用的传输协议(如HTTP或HTTPS)和消息格式(如SOAP 1.1或1.2)。 4. **消息(`&lt;message&gt;`)**:消息描述了服务交互中的数据单元。在本例中,由于...

    definitions.json

    Chrome扩展AdvanceRestClient加载的json文件definitions.json

    definitions.json_

    **标题:“definitions.json_”** **描述:**“Chrome扩展AdvanceRestClient加载的json文件definitions.json” 在深入了解“definitions.json”之前,我们首先需要理解Chrome扩展和Advance Rest Client(ARC)。...

    Advanced REST Client的definitions插件

    **高级REST客户端(Advanced REST Client)的definitions插件详解** 高级REST客户端(Advanced REST Client,简称ARC)是一款功能强大的Chrome浏览器扩展,专为开发者设计,用于测试和调试RESTful Web服务。它允许用户...

    NVM_Express1.1标准规范

    - 定义(Definitions):提供了一系列与NVMe技术相关的专业术语和概念的解释,例如Admin Queue(管理队列)、命令完成(Command Completion)、控制器(Controller)等。 - 约定(Conventions):介绍了文档中使用的...

    WSDL1.1标准规范

    《WSDL 1.1标准规范:理解网络服务描述语言》 WSDL(Web Services Description Language)1.1版本作为W3C发布的官方标准规范,是描述网络服务的一套详尽指南,旨在为开发者提供一个统一、标准化的方式,来定义和...

    Advanced-REST-client_v3.1.9+definitions.json

    《Advanced-REST-client_v3.1.9与definitions.json:深入理解REST API调试工具与定义文件》 在当今的Web开发领域,RESTful API已经成为构建分布式系统和微服务架构的标准接口设计模式。为了方便开发者测试和调试...

    definitions.JSON

    Chrome扩展AdvanceRestClient加载的json文件definitions.json

    advanced rest client definitions.json

    chrome浏览器安装advanced rest client插件时所需要的definitions.json文件,文件为txt格式,可以直接使用

    chrome插件Advanced-REST-client及配置文件definitions.json

    5. **环境管理**:通过 `definitions.json` 配置文件,可以管理不同的环境配置,例如不同API服务器的URL、认证信息等,使得切换环境更加便捷。 6. **测试套件**:用户可以创建测试套件,包含一系列请求,进行自动化...

    水晶报表各种示例(中)5-8

    7.该 C# Windows 程序实例示范了如何将日期范围值传递给子报表的参数(使用主报表参数字段定义 (Parameter Field Definitions) 集合). 8.该 C# Windows 程序实例示范了如何使用引擎对象模型 (engine object model) ...

    5000 Collegiate Words with Brief Definitions and SAT Math Notes

    SAT 高频词汇含数学笔记。

    Advanced REST client和definitions.json

    **Advanced REST Client (ARC) 和 definitions.json** Advanced REST Client(ARC)是一款强大的在线HTTP客户端工具,主要用于测试和调试RESTful Web服务。它是一款基于浏览器的插件,特别适合开发人员和系统管理员...

Global site tag (gtag.js) - Google Analytics