-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhttp_reader.txt
55 lines (55 loc) · 1.87 KB
/
http_reader.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Message = Request | Response
Request =
*(EOL) | *(WS)
Request-Line EOL
*(Header-Line EOL)
EOL
[Body]
Response =
*(EOL) | *(WS)
Status-Line EOL
*(Header-Line EOL)
EOL
[Body]
Request-Line = Method 1*(WS) Request-URI 1*(WS) HTTP-Version
Status-Line = HTTP-Version 1*(WS) Status-Code 1*(WS) Reason-Phrase
Method = token
Request-URI = 1*(unreserved | reserved)
Status-Code = 3DIGIT
Reason-Phrase = *<any OCTET except CTLs, but including WS>
HTTP-Version = "HTTP" "/" 1*DIGIT "." 1*DIGIT
Header-Line = Field-Name *(WS) ":" Field-Value
Body = *OCTET
Field-Name = token
Field-Value = *(Field-Content | LWS)
Field-Content = <the OCTETs making up the field-value
and consisting of either *TEXT or combinations
of token, separators, and quoted-string>
unreserved = ALPHA | DIGIT | "-" | "." | "_" | "~"
reserved = gen-delims | sub-delims
gen-delims = ":" | "/" | "?" | "#" | "[" | "]" | "@"
sub-delims = "!" | "$" | "&" | "'" | "(" | ")" | "*" | "+" | "," | ";" | "="
token = 1*<any CHAR except CTLs or separators>
separators = "(" | ")" | "<" | ">" | "@"
| "," | ";" | ":" | "\" | <">
| "/" | "[" | "]" | "?" | "="
| "{" | "}" | SP | HT
quoted-string = (<"> *(qdtext | quoted-pair) <">)
qdtext = <any TEXT except <">>
quoted-pair = "\" CHAR
TEXT = <any OCTET except CTLs, but including LWS>
LWS = [EOL] 1*(SP | HT)
WS = SP | HT
EOL = LF | CRLF
OCTET = <any 8-bit sequence of data>
CHAR = <any US-ASCII character (octets 0 - 127)>
ALPHA = UPALPHA | LOALPHA
UPALPHA = <any US-ASCII uppercase letter "A".."Z">
LOALPHA = <any US-ASCII lowercase letter "a".."z">
DIGIT = <any US-ASCII digit "0".."9">
CTL = <any US-ASCII control character (octets 0 - 31) and DEL (127)>
CR = <US-ASCII CR, carriage return (13)>
LF = <US-ASCII LF, linefeed (10)>
SP = <US-ASCII SP, space (32)>
HT = <US-ASCII HT, horizontal-tab (9)>
<"> = <US-ASCII double-quote mark (34)>