A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://greenbytes.de/tech/webdav/draft-reschke-http-oob-encoding-00.xml below:

This document describes an Hypertext Transfer Protocol (HTTP) content coding ( ) that can be used to describe the location of a secondary resource that contans the payload. The primary use case for this content coding is to enable origin servers to delegate the delivery of content to a secondary server that might be "closer" to the client (with respect to network topology) and/or able to cache content, leveraging content encrytion, as described in . The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in . This document reuses terminology used in the base HTTP specifications, namely and . The 'Out-Of-Band' content coding is used to direct the recipient to retrieve the actual message representation ( ) from a secondary resource, such as a public cache: Client performs GET request Received response specifies the 'out-of-band' content coding; the payload of the response contains additional meta data, plus the location of the secondary resource Client performs GET request on secondary resource (usually again via HTTP(s)) Secondary server provides wrapped HTTP message Client unwraps that representation (obtaining a full HTTP message) Client combines above representation with additional representation metadata obtained from the primary resource Client Secondary Server Origin Server sends GET request with Accept-Encoding: out-of-band ( ) |---------------------------------------------------------\ status 200 and Content-Coding: out-of-band | ( ) <---------------------------------------------------------/ GET to secondary server ( ) |---------------------------\ wrapped HTTP message | ( ) <---------------------------/ ( , ) Client and combines HTTP message received in ( ) with metadata received in ( ). The name of the content coding is "out-of-band". The payload format uses JavaScript Object Notation (JSON, ), describing an array of objects describing secondary resources, each containing some of the members below: A &REQUIRED; string containing the URI reference ( ) of the secondary resource. An &OPTIONAL; object containing additional members, representing header field values to be recombined with the metadata from the secondary resource and which can not appear as header fields in the response message itself (header fields that occur multiple times need to be combined into a single field value as per ; header field names are lower-cased). The payload format uses a JSON array so that the origin server can specify multiple secondary resources. When a client receives a response containing multiple entries, it is free to choose which of these to use. The representation of the secondary resource needs to use a media type capable of representing a full HTTP message. For now the only supported type is "application/http" ( ). The client then obtains the original message by: Unwrap the encapsulated HTTP message by removing any transfer and content codings. The latter might require additional metadata that could be present in the "metadata" object, such as the "Encryption-Key" header field described in . Replacing/setting any response header fields from the primary response except for framing-related information such as Content-Length, Transfer-Encoding and Content-Encoding. Replacing/setting any header fields with those present as members in the "metadata" object. Do we have a use case for this? Note that although this mechanism causes the inclusion of external content, it will not affect the application-level security properties of the reconstructed message, such as its web origin ( ). The cacheability of the response for the secondary resource does not affect the cacheability of the reconstructed response message, which is the same as for the origin server's response. Client request of primary resource: GET /test HTTP/1.1 Host: www.example.com Accept-Encoding: gzip, out-of-band Response: HTTP/1.1 200 OK Date: Thu, 14 May 2015 18:52:00 GMT Content-Type: text/plain Cache-Control: max-age=10, public Content-Encoding: out-of-band Content-Length: [{ "URI": "http://example.net/bae27c36-fa6a-11e4-ae5d-00059a3c7a00" }] (note that the Content-Type header field describes the media type of the secondary's resource representation) Client request for secondary resource: GET /bae27c36-fa6a-11e4-ae5d-00059a3c7a00 HTTP/1.1 Host: example.net Response: HTTP/1.1 200 OK Date: Thu, 14 May 2015 18:52:10 GMT Content-Type: application/http Cache-Control: private Content-Length: HTTP/1.1 200 OK Date: Thu, 14 May 2015 17:00:00 GMT Content-Length: Content-Language: en Hello, world. Final message after recombining header fields: HTTP/1.1 200 OK Date: Thu, 14 May 2015 18:52:00 GMT Content-Length: Cache-Control: max-age=10, public Content-Type: text/plain Content-Language: en Hello, world. In this example, Cache-Control, Content-Length, and Date have been set/overwritten with data from the primary resource's representation. Given the example HTTP message from , a primary resource could use the "out-of-band" encoding to specify just the location of the secondary resource plus the contents of the "Encryption-Key" header field needed to decrypt the payload: Response: HTTP/1.1 200 OK Date: Thu, 14 May 2015 18:52:00 GMT Content-Encoding: out-of-band Content-Type: text/plain Content-Length: [{ "URI": "http://example.net/bae27c36-fa6a-11e4-ae5d-00059a3c7a00" "metadata": { "encryption-key": "keyid=\"a1\"; key=\"9Z57YCb3dK95dSsdFJbkag\"" } }] (note that the Content-Type header field describes the media type of the secondary's resource representation) Response for secondary resource: HTTP/1.1 200 OK Date: Thu, 14 May 2015 18:52:10 GMT Content-Type: application/http Content-Length: ... Cache-Control: private HTTP/1.1 200 OK Content-Length: 31 Content-Encoding: aesgcm-128 Encryption: keyid="a1"; salt="ibZx1RNz537h1XNkRcPpjA" zK3kpG__Z8whjIkG6RYgPz11oUkTKcxPy9WP-VPMfuc (payload body shown in base64 here) Final message after recombining header fields: HTTP/1.1 200 OK Date: Thu, 14 May 2015 18:52:00 GMT Content-Length: Content-Type: text/plain I am the walrus New content codings can be deployed easily, as the client can use the "Accept-Encoding" header field ( ) to signal which content codings are supported. Such as: how is the secondary resource safe from being modified without knowledge of the primary resource? In general, content codings can be used in both requests and responses. This particular content coding has been designed for responses. When supported in requests, it creates a new attack vector where the receiving server can be tricked into including content that the client might not have access to otherwise (such as HTTP resources behind a firewall). The IANA "HTTP Content Coding Registry", located at , needs to be updated with the registration below: out-of-band Payload needs to be retrieved from a secondary resource of this document

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4