Structured Field Values for HTTP
draft-ietf-httpbis-header-structure-19
HTTP M. Nottingham
Internet-Draft Fastly
Intended status: Standards Track P-H. Kamp
Expires: December 5, 2020 The Varnish Cache Project
June 3, 2020
Structured Field Values for HTTP
draft-ietf-httpbis-header-structure-19
Abstract
This document describes a set of data types and associated algorithms
that are intended to make it easier and safer to define and handle
HTTP header and trailer fields, known as "Structured Fields",
"Structured Headers", or "Structured Trailers". It is intended for
use by specifications of new HTTP fields that wish to use a common
syntax that is more restrictive than traditional HTTP field values.
Note to Readers
_RFC EDITOR: please remove this section before publication_
Discussion of this draft takes place on the HTTP working group
mailing list (ietf-http-wg@w3.org), which is archived at
https://lists.w3.org/Archives/Public/ietf-http-wg/ [1].
Working Group information can be found at https://httpwg.github.io/
[2]; source code and issues list for this draft can be found at
https://github.com/httpwg/http-extensions/labels/header-structure
[3].
Tests for implementations are collected at https://github.com/httpwg/
structured-field-tests [4].
Implementations are tracked at https://github.com/httpwg/wiki/wiki/
Structured-Headers [5].
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/.
Nottingham & Kamp Expires December 5, 2020 [Page 1]
Internet-Draft Structured Field Values for HTTP June 2020
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on December 5, 2020.
Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Intentionally Strict Processing . . . . . . . . . . . . . 4
1.2. Notational Conventions . . . . . . . . . . . . . . . . . 5
2. Defining New Structured Fields . . . . . . . . . . . . . . . 5
3. Structured Data Types . . . . . . . . . . . . . . . . . . . . 8
3.1. Lists . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1.1. Inner Lists . . . . . . . . . . . . . . . . . . . . . 9
3.1.2. Parameters . . . . . . . . . . . . . . . . . . . . . 10
3.2. Dictionaries . . . . . . . . . . . . . . . . . . . . . . 11
3.3. Items . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3.1. Integers . . . . . . . . . . . . . . . . . . . . . . 13
3.3.2. Decimals . . . . . . . . . . . . . . . . . . . . . . 13
3.3.3. Strings . . . . . . . . . . . . . . . . . . . . . . . 14
3.3.4. Tokens . . . . . . . . . . . . . . . . . . . . . . . 15
3.3.5. Byte Sequences . . . . . . . . . . . . . . . . . . . 15
3.3.6. Booleans . . . . . . . . . . . . . . . . . . . . . . 15
4. Working With Structured Fields in HTTP . . . . . . . . . . . 16
4.1. Serializing Structured Fields . . . . . . . . . . . . . . 16
4.1.1. Serializing a List . . . . . . . . . . . . . . . . . 16
4.1.2. Serializing a Dictionary . . . . . . . . . . . . . . 18
4.1.3. Serializing an Item . . . . . . . . . . . . . . . . . 19
4.1.4. Serializing an Integer . . . . . . . . . . . . . . . 20
4.1.5. Serializing a Decimal . . . . . . . . . . . . . . . . 20
4.1.6. Serializing a String . . . . . . . . . . . . . . . . 21
Nottingham & Kamp Expires December 5, 2020 [Page 2]
Show full document text