catalog/rfc9110-http.abnf

Source

; <https://www.rfc-editor.org/rfc/rfc9110.html>

; 4.1. <https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-references>
URI-reference = <import rfc3986-uri.abnf URI-reference>
absolute-URI  = <import rfc3986-uri.abnf absolute-URI>
relative-part = <import rfc3986-uri.abnf relative-part>
authority     = <import rfc3986-uri.abnf authority>
uri-host      = <import rfc3986-uri.abnf host>
port          = <import rfc3986-uri.abnf port>
path-abempty  = <import rfc3986-uri.abnf path-abempty>
segment       = <import rfc3986-uri.abnf segment>
query         = <import rfc3986-uri.abnf query>

absolute-path = 1*( "/" segment )
partial-URI   = relative-part [ "?" query ]

; 4.2.1. http URI Scheme <https://www.rfc-editor.org/rfc/rfc9110.html#name-http-related-uri-schemes>
http-URI = "http" "://" authority path-abempty [ "?" query ]

; 4.2.2. https URI Scheme <https://www.rfc-editor.org/rfc/rfc9110.html#name-https-uri-scheme>
https-URI = "https" "://" authority path-abempty [ "?" query ]

; 5.1. Field Names <https://www.rfc-editor.org/rfc/rfc9110.html#name-field-names>
field-name     = token

; 5.5. Field Values <https://www.rfc-editor.org/rfc/rfc9110.html#name-field-values>
field-value    = *field-content
field-content  = field-vchar
                 [ 1*( SP / HTAB / field-vchar ) field-vchar ]
field-vchar    = VCHAR / obs-text
obs-text       = %x80-FF

; 5.6.2. Tokens <https://www.rfc-editor.org/rfc/rfc9110.html#name-tokens>
token          = 1*tchar

tchar          = "!" / "#" / "$" / "%" / "&" / "'" / "*"
               / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
               / DIGIT / ALPHA
               ; any VCHAR, except delimiters

; 5.6.3. Whitespace <https://www.rfc-editor.org/rfc/rfc9110.html#name-whitespace>

OWS            = *( SP / HTAB )
; optional whitespace
RWS            = 1*( SP / HTAB )
; required whitespace
BWS            = OWS
; "bad" whitespace

quoted-string  = DQUOTE *( qdtext / quoted-pair ) DQUOTE
qdtext         = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text

quoted-pair    = "\" ( HTAB / SP / VCHAR / obs-text )

; 5.6.5. Comments <https://www.rfc-editor.org/rfc/rfc9110.html#name-comments>

comment        = "(" *( ctext / quoted-pair / comment ) ")"
ctext          = HTAB / SP / %x21-27 / %x2A-5B / %x5D-7E / obs-text

; 5.6.6. Parameters <https://www.rfc-editor.org/rfc/rfc9110.html#name-parameters>
parameters      = *( OWS ";" OWS [ parameter ] )
parameter       = parameter-name "=" parameter-value
parameter-name  = token
parameter-value = ( token / quoted-string )

; 5.6.7. Date/Time Formats <https://www.rfc-editor.org/rfc/rfc9110.html#name-date-time-formats>
HTTP-date    = IMF-fixdate / obs-date

; Obsolete formats:
obs-date     = rfc850-date / asctime-date
rfc850-date  = day-name-l "," SP date2 SP time-of-day SP GMT
date2        = day "-" month "-" 2DIGIT
; e.g., 02-Jun-82
day-name-l   = %s"Monday" / %s"Tuesday" / %s"Wednesday"
             / %s"Thursday" / %s"Friday" / %s"Saturday"
             / %s"Sunday"
asctime-date = day-name SP date3 SP time-of-day SP year
date3        = month SP ( 2DIGIT / ( SP 1DIGIT ))
; e.g., Jun  2

IMF-fixdate  = day-name "," SP date1 SP time-of-day SP GMT
; fixed length/zone/capitalization subset of the format
; see Section 3.3 of [RFC5322]

day-name     = %s"Mon" / %s"Tue" / %s"Wed"
             / %s"Thu" / %s"Fri" / %s"Sat" / %s"Sun"

date1        = day SP month SP year
             ; e.g., 02 Jun 1982

day          = 2DIGIT
month        = %s"Jan" / %s"Feb" / %s"Mar" / %s"Apr"
             / %s"May" / %s"Jun" / %s"Jul" / %s"Aug"
             / %s"Sep" / %s"Oct" / %s"Nov" / %s"Dec"
year         = 4DIGIT

GMT          = %s"GMT"

time-of-day  = hour ":" minute ":" second
             ; 00:00:00 - 23:59:60 (leap second)

hour         = 2DIGIT
minute       = 2DIGIT
second       = 2DIGIT

; 6.6.1. Date <https://www.rfc-editor.org/rfc/rfc9110.html#name-date>
Date = HTTP-date

; 6.6.2. Trailer <https://www.rfc-editor.org/rfc/rfc9110.html#name-trailer>
Trailer = #field-name

; 7.2. Host and :authority <https://www.rfc-editor.org/rfc/rfc9110.html#name-host-and-authority>
Host = uri-host [ ":" port ] ; Section 4

; 7.6.1. Connection <https://www.rfc-editor.org/rfc/rfc9110.html#name-connection>
Connection        = #connection-option
connection-option = token

; 7.6.2. Max-Forwards <https://www.rfc-editor.org/rfc/rfc9110.html#name-max-forwards>
Max-Forwards = 1*DIGIT

; 7.6.3. Via <https://www.rfc-editor.org/rfc/rfc9110.html#name-via>
Via = #( received-protocol RWS received-by [ RWS comment ] )

received-protocol = [ protocol-name "/" ] protocol-version
; see Section 7.8
received-by       = pseudonym [ ":" port ]
pseudonym         = token

; 7.8. Upgrade <https://www.rfc-editor.org/rfc/rfc9110.html#name-upgrade>
Upgrade          = #protocol

protocol         = protocol-name ["/" protocol-version]
protocol-name    = token
protocol-version = token

; 8.3. Content-Type <https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type>
Content-Type = media-type

; 8.3.1. Media Type <https://www.rfc-editor.org/rfc/rfc9110.html#name-media-type>
media-type = type "/" subtype parameters
type       = token
subtype    = token

; 8.4. Content-Encoding <https://www.rfc-editor.org/rfc/rfc9110.html#name-content-encoding>
Content-Encoding = #content-coding

; 8.4.1. Content Codings <https://www.rfc-editor.org/rfc/rfc9110.html#name-content-codings>
content-coding   = token

; 8.5. Content-Language <https://www.rfc-editor.org/rfc/rfc9110.html#name-content-language>
Content-Language = #language-tag

; 8.5.1. Language Tags <https://www.rfc-editor.org/rfc/rfc9110.html#name-language-tags>
;language-tag = <Language-Tag, see [RFC5646], Section 2.1>
language-tag = <import rfc5646-langtag.abnf Language-Tag>

; 8.6. Content-Length <https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length>
Content-Length = 1*DIGIT

; 8.7. Content-Location <https://www.rfc-editor.org/rfc/rfc9110.html#name-content-location>
Content-Location = absolute-URI / partial-URI

; 8.8.2. Last-Modified <https://www.rfc-editor.org/rfc/rfc9110.html#name-last-modified>
Last-Modified = HTTP-date

; 8.8.3. ETag <https://www.rfc-editor.org/rfc/rfc9110.html#name-etag>
ETag       = entity-tag

entity-tag = [ weak ] opaque-tag
weak       = %s"W/"
opaque-tag = DQUOTE *etagc DQUOTE
etagc      = %x21 / %x23-7E / obs-text
           ; VCHAR except double quotes, plus obs-text

; 9. Methods
; 9.1. Overview
method = token

; 10.1.1. Expect <https://www.rfc-editor.org/rfc/rfc9110.html#name-expect>
Expect =      #expectation
expectation = token [ "=" ( token / quoted-string ) parameters ]

; 10.1.2. From <https://www.rfc-editor.org/rfc/rfc9110.html#name-from>
From    = mailbox
;mailbox = <mailbox, see [RFC5322], Section 3.4>
mailbox = <import rfc5322-email.abnf mailbox>

; 10.1.3. Referer <https://www.rfc-editor.org/rfc/rfc9110.html#name-referer>
Referer = absolute-URI / partial-URI

; 10.1.4. TE <https://www.rfc-editor.org/rfc/rfc9110.html#name-te>
TE                 = #t-codings
t-codings          = "trailers" / ( transfer-coding [ weight ] )
transfer-coding    = token *( OWS ";" OWS transfer-parameter )
transfer-parameter = token BWS "=" BWS ( token / quoted-string )

; 10.1.5. User-Agent <https://www.rfc-editor.org/rfc/rfc9110.html#name-user-agent>
User-Agent = product *( RWS ( product / comment ) )
product         = token ["/" product-version]
product-version = token

; 10.2.1. Allow <https://www.rfc-editor.org/rfc/rfc9110.html#name-allow>
Allow = #method

; 10.2.2. Location <https://www.rfc-editor.org/rfc/rfc9110.html#name-location>
Location = URI-reference

; 10.2.3. Retry-After <https://www.rfc-editor.org/rfc/rfc9110.html#name-retry-after>
Retry-After = HTTP-date / delay-seconds
delay-seconds  = 1*DIGIT

; 10.2.4. Server <https://www.rfc-editor.org/rfc/rfc9110.html#name-server>
Server = product *( RWS ( product / comment ) )

; 11. HTTP Authentication
; 11.1. Authentication Scheme <https://www.rfc-editor.org/rfc/rfc9110.html#name-authentication-scheme>
auth-scheme    = token

; 11.2. Authentication Parameters <https://www.rfc-editor.org/rfc/rfc9110.html#name-authentication-parameters>
token68        = 1*( ALPHA / DIGIT /
                     "-" / "." / "_" / "~" / "+" / "/" ) *"="

auth-param     = token BWS "=" BWS ( token / quoted-string )

; 11.3. Challenge and Response <https://www.rfc-editor.org/rfc/rfc9110.html#name-challenge-and-response>
challenge   = auth-scheme [ 1*SP ( token68 / #auth-param ) ]

; 11.4. Credentials <https://www.rfc-editor.org/rfc/rfc9110.html#name-credentials>
credentials = auth-scheme [ 1*SP ( token68 / #auth-param ) ]

; 11.6.1. WWW-Authenticate <https://www.rfc-editor.org/rfc/rfc9110.html#name-www-authenticate>
WWW-Authenticate = #challenge

; 11.6.2. Authorization <https://www.rfc-editor.org/rfc/rfc9110.html#name-authorization>
Authorization = credentials

; 11.6.3. Authentication-Info <https://www.rfc-editor.org/rfc/rfc9110.html#name-authentication-info>
Authentication-Info = #auth-param

; 11.7.1. Proxy-Authenticate <https://www.rfc-editor.org/rfc/rfc9110.html#name-proxy-authenticate>
Proxy-Authenticate = #challenge

; 11.7.2. Proxy-Authorization <https://www.rfc-editor.org/rfc/rfc9110.html#name-proxy-authorization>
Proxy-Authorization = credentials

; 11.7.3. Proxy-Authentication-Info <https://www.rfc-editor.org/rfc/rfc9110.html#name-proxy-authentication-info>
Proxy-Authentication-Info = #auth-param

; 12.4.2. Quality Values <https://www.rfc-editor.org/rfc/rfc9110.html#name-quality-values>
weight = OWS ";" OWS "q=" qvalue
qvalue = ( "0" [ "." 0*3DIGIT ] )
       / ( "1" [ "." 0*3("0") ] )

; 12.5.1. Accept <https://www.rfc-editor.org/rfc/rfc9110.html#name-accept>
Accept = #( media-range [ weight ] )

media-range    = ( "*/*"
                 / ( type "/" "*" )
                 / ( type "/" subtype )
                 ) parameters

; 12.5.2. Accept-Charset <https://www.rfc-editor.org/rfc/rfc9110.html#name-accept-charset>
Accept-Charset = #( ( token / "*" ) [ weight ] )

; 12.5.3. Accept-Encoding <https://www.rfc-editor.org/rfc/rfc9110.html#name-accept-encoding>
Accept-Encoding  = #( codings [ weight ] )
codings          = content-coding / "identity" / "*"

; 12.5.4. Accept-Language <https://www.rfc-editor.org/rfc/rfc9110.html#name-accept-language>
;Accept-Language = #( language-range [ weight ] )
Accept-Language = [language-range [ weight ]] *( "," language-range [ weight ] )
;language-range  = <language-range, see [RFC4647], Section 2.1>
language-range  = <import rfc4647-langrange.abnf language-range>

; 12.5.5. Vary <https://www.rfc-editor.org/rfc/rfc9110.html#name-vary>
Vary = #( "*" / field-name )

; 13.1.1. If-Match <https://www.rfc-editor.org/rfc/rfc9110.html#name-if-match>
If-Match = "*" / #entity-tag

; 13.1.2. If-None-Match <https://www.rfc-editor.org/rfc/rfc9110.html#name-if-none-match>
If-None-Match = "*" / #entity-tag

; 13.1.3. If-Modified-Since <https://www.rfc-editor.org/rfc/rfc9110.html#name-if-modified-since>
If-Modified-Since = HTTP-date

; 13.1.4. If-Unmodified-Since <https://www.rfc-editor.org/rfc/rfc9110.html#name-if-unmodified-since>
If-Unmodified-Since = HTTP-date

; 13.1.5. If-Range <https://www.rfc-editor.org/rfc/rfc9110.html#name-if-range>
If-Range = entity-tag / HTTP-date

; 14.1. Range Units <https://www.rfc-editor.org/rfc/rfc9110.html#name-range-units>
range-unit       = token

; 14.1.1. Range Specifiers <https://www.rfc-editor.org/rfc/rfc9110.html#name-range-specifiers>
ranges-specifier = range-unit "=" range-set
range-set        = 1#range-spec
range-spec       = int-range
                 / suffix-range
                 / other-range

int-range     = first-pos "-" [ last-pos ]
first-pos     = 1*DIGIT
last-pos      = 1*DIGIT

suffix-range  = "-" suffix-length
suffix-length = 1*DIGIT

other-range   = 1*( %x21-2B / %x2D-7E )
              ; 1*(VCHAR excluding comma)

; 14.2. Range <https://www.rfc-editor.org/rfc/rfc9110.html#name-range>
Range = ranges-specifier

; 14.3. Accept-Ranges <https://www.rfc-editor.org/rfc/rfc9110.html#name-accept-ranges>
Accept-Ranges     = acceptable-ranges
acceptable-ranges = 1#range-unit

; 14.4. Content-Range <https://www.rfc-editor.org/rfc/rfc9110.html#name-content-range>
Content-Range       = range-unit SP
                      ( range-resp / unsatisfied-range )

range-resp          = incl-range "/" ( complete-length / "*" )
incl-range          = first-pos "-" last-pos
unsatisfied-range   = "*/" complete-length

complete-length     = 1*DIGIT

Info

Rules
URI-reference, absolute-URI, relative-part, authority, uri-host, port, path-abempty, segment, query, absolute-path, partial-URI, http-URI, https-URI, field-name, field-value, field-content, field-vchar, obs-text, token, tchar, OWS, RWS, BWS, quoted-string, qdtext, quoted-pair, comment, ctext, parameters, parameter, parameter-name, parameter-value, HTTP-date, obs-date, rfc850-date, date2, day-name-l, asctime-date, date3, IMF-fixdate, day-name, date1, day, month, year, GMT, time-of-day, hour, minute, second, Date, Trailer, Host, Connection, connection-option, Max-Forwards, Via, received-protocol, received-by, pseudonym, Upgrade, protocol, protocol-name, protocol-version, Content-Type, media-type, type, subtype, Content-Encoding, content-coding, Content-Language, language-tag, Content-Length, Content-Location, Last-Modified, ETag, entity-tag, weak, opaque-tag, etagc, method, Expect, expectation, From, mailbox, Referer, TE, t-codings, transfer-coding, transfer-parameter, User-Agent, product, product-version, Allow, Location, Retry-After, delay-seconds, Server, auth-scheme, token68, auth-param, challenge, credentials, WWW-Authenticate, Authorization, Authentication-Info, Proxy-Authenticate, Proxy-Authorization, Proxy-Authentication-Info, weight, qvalue, Accept, media-range, Accept-Charset, Accept-Encoding, codings, Accept-Language, language-range, Vary, If-Match, If-None-Match, If-Modified-Since, If-Unmodified-Since, If-Range, range-unit, ranges-specifier, range-set, range-spec, int-range, first-pos, last-pos, suffix-range, suffix-length, other-range, Range, Accept-Ranges, acceptable-ranges, Content-Range, range-resp, incl-range, unsatisfied-range, complete-length
Dependencies
Used Builtins
ALPHA, DIGIT, DQUOTE, HTAB, SP, VCHAR

Alphabet

Cited By

Implementations