< draft-kamp-httpbis-structure-00.txt   draft-kamp-httpbis-structure-01.txt >
Network Working Group PH. Kamp Network Working Group PH. Kamp
Internet-Draft The Varnish Cache Project Internet-Draft The Varnish Cache Project
Intended status: Informational October 05, 2016 Intended status: Informational October 30, 2016
Expires: April 8, 2017 Expires: May 3, 2017
HTTP header common structure HTTP header common structure
draft-kamp-httpbis-structure-00 draft-kamp-httpbis-structure-01
Abstract Abstract
An abstract data model for HTTP headers, "Common Structure", and a An abstract data model for HTTP headers, "Common Structure", and a
HTTP/1 serialization of it, generalized from current HTTP headers. HTTP/1 serialization of it, generalized from current HTTP headers.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
skipping to change at page 1, line 31 skipping to change at page 1, line 31
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 8, 2017. This Internet-Draft will expire on May 3, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2016 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 48 skipping to change at page 2, line 48
For textual formats, such as JSON, the format must first be neutered For textual formats, such as JSON, the format must first be neutered
to not violate field-value's ABNF, and then workarounds added to to not violate field-value's ABNF, and then workarounds added to
reintroduce the features just lost, for instance UNICODE strings, and reintroduce the features just lost, for instance UNICODE strings, and
suddenly it is no longer JSON anymore. suddenly it is no longer JSON anymore.
This proposal starts from the other end, and builds and generalizes a This proposal starts from the other end, and builds and generalizes a
data structure definition from existing HTTP headers, which means data structure definition from existing HTTP headers, which means
that HTTP/1 serialization and 'field-value' compatibility is built that HTTP/1 serialization and 'field-value' compatibility is built
in. in.
If all new HTTP headers are defined to fit into this Common Structure If all future HTTP headers are defined to fit into this Common
we have at least halted the proliferation of bespoke parsers and Structure we have at least halted the proliferation of bespoke
started to pave the road for semantic compression serializations of parsers and started to pave the road for semantic compression
HTTP traffic. serializations of HTTP traffic.
1.1. Terminology 1.1. Terminology
In this document, the key words "MUST", "MUST NOT", "REQUIRED", In this document, the key words "MUST", "MUST NOT", "REQUIRED",
"SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
and "OPTIONAL" are to be interpreted as described in BCP 14, RFC 2119 and "OPTIONAL" are to be interpreted as described in BCP 14, RFC 2119
[RFC2119]. [RFC2119].
2. Definition of HTTP header Common Structure 2. Definition of HTTP header Common Structure
skipping to change at page 4, line 20 skipping to change at page 4, line 20
dictionary = * ( identifier value ) dictionary = * ( identifier value )
value = identifier / value = identifier /
number / number /
ascii_string / ascii_string /
unicode_string / unicode_string /
blob / blob /
timestamp / timestamp /
common-structure common-structure
identifier = (token / "*") [ token / "*" ] identifier = token [ "/" token ]
number = ["-"] 1*15 DIGIT number = ["-"] 1*15 DIGIT
# XXX: Not sure how to do this in ABNF: # XXX: Not sure how to do this in ABNF:
# XXX: A single "." allowed between any two digits # XXX: A single "." allowed between any two digits
# The range is limited is to ensure it can be # The range is limited is to ensure it can be
# correctly represented in IEEE754 64 bit # correctly represented in IEEE754 64 bit
# binary floating point format. # binary floating point format.
ascii_string = * %x20-7e ascii_string = * %x20-7e
# This is a "safe" string in the sense that it # This is a "safe" string in the sense that it
skipping to change at page 5, line 4 skipping to change at page 5, line 4
timestamp = POSIX time_t with optional millisecond resolution timestamp = POSIX time_t with optional millisecond resolution
# XXX: Is there a place to import this from ? # XXX: Is there a place to import this from ?
3. HTTP/1 serialization of HTTP header Common Structure 3. HTTP/1 serialization of HTTP header Common Structure
In ABNF: In ABNF:
import OWS from {{RFC7230}} import OWS from {{RFC7230}}
import HEXDIG, DQUOTE from {{RFC5234}} import HEXDIG, DQUOTE from {{RFC5234}}
import UTF8-2, UTF8-3, UTF8-4 from {{RFC3629}}
h1_common-structure-header = h1_common-structure-header =
( field-name ":" OWS ">" h1_common_structure "<" ) ( field-name ":" OWS ">" h1_common_structure "<" )
# Self-identifying HTTP headers # Self-identifying HTTP headers
( field-name ":" OWS h1_common_structure ) / ( field-name ":" OWS h1_common_structure ) /
# legacy HTTP headers on white-list, see {{iana}} # legacy HTTP headers on white-list, see {{iana}}
h1_common_structure = h1_element * ("," h1_element) h1_common_structure = h1_element * ("," h1_element)
h1_element = identifier * (";" identifier ["=" h1_value]) h1_element = identifier * (";" identifier ["=" h1_value])
skipping to change at page 5, line 39 skipping to change at page 5, line 41
# This is a proper subset of h1_unicode_string # This is a proper subset of h1_unicode_string
# NB only allowed backslash escapes are \" and \\ # NB only allowed backslash escapes are \" and \\
h1_unicode_string = DQUOTE *( h1_unicode_string = DQUOTE *(
( "\" DQUOTE ) ( "\" DQUOTE )
( "\" "\" ) / ( "\" "\" ) /
( "\" "u" 4*HEXDIG ) / ( "\" "u" 4*HEXDIG ) /
0x20-21 / 0x20-21 /
0x23-5B / 0x23-5B /
0x5D-7E / 0x5D-7E /
0x80-F7 UTF8-2 /
UTF8-3 /
UTF8-4
) DQUOTE ) DQUOTE
# XXX: how to say/import "UTF-8 encoding" ? # This is UTF8 with HTTP1 unfriendly codepoints
# HTTP1 unfriendly codepoints (00-1f, 7f) must be # (00-1f, 7f) neutered with \uXXXX escapes.
# encoded with \uXXXX escapes
h1_blob = "'" base64 "'" h1_blob = "'" base64 "'"
# XXX: where to import base64 from ? # XXX: where to import base64 from ?
h1_timestamp = number h1_timestamp = number
# UNIX/POSIX time_t semantics. # UNIX/POSIX time_t semantics.
# fractional seconds allowed. # fractional seconds allowed.
h1_common_structure = ">" h1_common_structure "<" h1_common_structure = ">" h1_common_structure "<"
 End of changes. 8 change blocks. 
13 lines changed or deleted 16 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/