message http{ request { requestLine= Method SP Request-URI SP HTTP-Version CRLF header Accept= *( media-range [accept-params] ) media-range= ( "*/*" | ( type "/" "*" ) | ( type "/" subtype ) ) *( ";" parameter ) accept-params= ";" "q" "=" qvalue *( accept-extension ) accept-extension= ";" token ["=" ( token | quoted-string )] header Accept-Charset= 1*( charset [";" "q" "=" qvalue] ) header Accept-Encoding= *( content-coding ) header Accept-Language= 1*( language-range [";" "q" "=" qvalue] ) language-range= ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" ) header Accept-Ranges= acceptable-ranges acceptable-ranges= 1*range-unit | "none" header Authorization= credentials header From= mailbox mailbox= token;TODO header Host= host [":" port] ; Section 3.2.2 header If-Modified-Since= HTTP-date header If-Match= ( "*" | 1*entity-tag ) header If-None-Match= ( "*" | 1*entity-tag ) header If-Range= ( entity-tag | HTTP-date ) header If-Unmodified-Since= HTTP-date header Max-Forwards= 1*DIGIT header Proxy-Authorization= credentials header Range= ranges-specifier header Referer= ( absoluteURI | relativeURI ) header User-Agent= 1*( product | comment ) } response { statusLine= HTTP-Version SP Status-Code SP Reason-Phrase CRLF header Age= age-value age-value= delta-seconds header Location= absoluteURI header Proxy-Authenticate= challenge header Public= 1*Method header Retry-After= ( HTTP-date | delta-seconds ) header Server= 1*( product | comment ) header Vary= ( "*" | 1*field-name ) header Warning= 1*warning-value warning-value= warn-code SP warn-agent SP warn-text warn-code= 2DIGIT warn-agent= ( host [":" port] ) | pseudonym ; the name or pseudonym of the server adding ; the Warning header, for use in debugging warn-text= quoted-string header WWW-Authenticate= 1*challenge } OCTET= token; TODO CHAR= (alphanum/"-"/"."/"!"/"%"/"*" /"_"/"+"/"`"/"'"/"~") UPALPHA= %x61-7A; [A-Z] LOALPHA= %x41-5A; [a-z] ALPHA= UPALPHA | LOALPHA DIGIT= %x30-39 alphanum=ALPHA/DIGIT CR=%x0D LF=%x0A ; linefeed CTL= %x00-31;/%x127 SP= %x20 HT= %x09 DQUOTE=%x22 CRLF= CR LF LWS= [CRLF] 1*( SP | HT ) word=1*(alphanum/"-"/"."/"!"/"%"/"*" /"_"/"+"/"`"/"'"/"~" /"("/")"/"<"/">" /":"/"\"/DQUOTE /"/"/"["/"]"/"?" /"{"/"}") TEXT= word ;NOT SO SURE HEX= "A" | "B" | "C" | "D" | "E" | "F" | "a" | "b" | "c" | "d" | "e" | "f" | DIGIT token= 1*CHAR tspecials= "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | DQUOTE | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT comment= "(" *( ctext ) ")" ctext=*token text= *token; TODO quoted-string= ( DQUOTE *( qdtext ) DQUOTE ) qdtext= *token ; TODO quoted-pair= "\" CHAR HTTP-Version= "HTTP" "/" 1*DIGIT "." 1*DIGIT URIspec= ( absoluteURI | relativeURI ) ["#" fragment] absoluteURI= scheme ":" *( uchar | reserved ) relativeURI= netpath | abspath | relpath netpath= "//" netloc [abspath] abspath= "/" relpath relpath= [path] [";" params] ["?" query] path= fsegment *( "/" segment ) fsegment= 1*pchar segment= *pchar params= param *( ";" param ) param= *( pchar | "/" ) scheme= 1*( ALPHA | DIGIT | "+" | "-" | "." ) netloc= *( pchar | ";" | "?" ) query= *( uchar | reserved ) fragment= *( uchar | reserved ) pchar= uchar | ":" | "@" | "&" | "=" | "+" uchar= unreserved | escape unreserved= ALPHA | DIGIT | safe | extra escape= "%" HEX HEX reserved= ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" extra= "!" | "*" | "'" | "(" | ")" | "," safe= "$" | "-" | "_" | "." unsafe= CTL | SP | DQUOTE | "#" | "%" | "<" | ">" hostport=host[":"port] host=hostname/IPv4address/IPv6reference hostname=*(domainlabel".")toplabel["."] domainlabel=alphanum/alphanum*(alphanum/"-")alphanum toplabel=ALPHA/ALPHA*(alphanum/"-")alphanum IPv4address=1*3DIGIT"."1*3DIGIT"."1*3DIGIT"."1*3DIGIT IPv6reference="["IPv6address"]" IPv6address=hexpart[":"IPv4address] hexpart=hexseq/hexseq"::"[hexseq]/"::"[hexseq] hexseq=hex4 *(":"hex4) HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" hex4=1*4HEXDIG port=1*DIGIT httpURL= "http:" "//" host [":" port] [abspath] HTTP-date= rfc1123-date | rfc850-date | asctime-date rfc1123-date= wkday "," SP date1 SP time SP "GMT" rfc850-date= weekday "," SP date2 SP time SP "GMT" asctime-date= wkday SP date3 SP time SP 4DIGIT date1= 2DIGIT SP month SP 4DIGIT ; day month year (e.g., 02 Jun 1982) date2= 2DIGIT "-" month "-" 2DIGIT ; day-month-year (e.g., 02-Jun-82) date3= month SP ( 2DIGIT | ( SP 1DIGIT ) ) ; month day (e.g., Jun 2) time= 2DIGIT ":" 2DIGIT ":" 2DIGIT ; 00:00:00 - 23:59:59 wkday= "Mon" | "Tue" | "Wed" | "Thu" | "Fri" | "Sat" | "Sun" weekday= "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday" month= "Jan" | "Feb" | "Mar" | "Apr" | "May" | "Jun" | "Jul" | "Aug" | "Sep" | "Oct" | "Nov" | "Dec" delta-seconds= 1*DIGIT charset= token content-coding= token transfer-coding= "chunked" | transfer-extension transfer-extension= token ;Chunked-Body= *chunk "0" CRLF footer CRLF chunk= chunk-size [chunk-ext] CRLF chunk-data CRLF hex-no-zero= "A" | "B" | "C" | "D" | "E" | "F" | "a" | "b" | "c" | "d" | "e" | "f" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" chunk-size= hex-no-zero *HEX chunk-ext= *( ";" chunk-ext-name ["=" chunk-ext-value] ) chunk-ext-name= token chunk-ext-value= token | quoted-string chunk-data= chunk-size ( OCTET ) ;footer= *entity-header media-type= type "/" subtype *( ";" parameter ) type= token subtype= token parameter= attribute "=" value attribute= token value= token | quoted-string product= token ["/" product-version] product-version= token qvalue= ( "0" ["." 0*3DIGIT] ) | ( "1" ["." 0*3( "0" )] ) language-tag= primary-tag *( "-" subtag ) primary-tag= 1*8ALPHA subtag= 1*8ALPHA entity-tag= [weak] opaque-tag weak= "W/" opaque-tag= quoted-string range-unit= bytes-unit | other-range-unit bytes-unit= "bytes" other-range-unit= token Method= "OPTIONS" | "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "TRACE" | extension-method extension-method= token Request-URI= "*" | absoluteURI | abspath Status-Code= "100" | "101" | "200" | "201" | "202" | "203" | "204" | "205" | "206" | "300" | "301" | "302" | "303" | "304" | "305" | "400" | "401" | "402" | "403" | "404" | "405" | "406" | "407" | "408" | "409" | "410" | "411" | "412" | "413" | "414" | "415" | "500"| "501" | "502" | "503" | "504" | "505"| extension-code extension-code= 3DIGIT Reason-Phrase= *(word); NOT SURE * entity-body= *OCTET auth-scheme= token auth-param= token "=" quoted-string challenge= auth-scheme 1*SP realm *( "," auth-param ) realm= "realm" "=" realm-value realm-value= quoted-string credentials= basic-credentials | auth-scheme *auth-param basic-credentials= "Basic" SP basic-cookie basic-cookie= word ; TODO user-pass user-pass= userid ":" password userid= *(word) ;TODO * password= *TEXT field-name = token header Allow= 1*Method header Cache-Control= 1*cache-directive cache-directive= cache-request-directive | cache-response-directive cache-request-directive= "no-cache" ["=" DQUOTE 1*field-name DQUOTE] | "no-store" | "max-age" "=" delta-seconds | "max-stale" ["=" delta-seconds] | "min-fresh" "=" delta-seconds | "only-if-cached" | cache-extension cache-response-directive= "public" | "private" ["=" DQUOTE 1*field-name DQUOTE] | "no-cache" ["=" DQUOTE 1*field-name DQUOTE] | "no-store" | "no-transform" | "must-revalidate" | "proxy-revalidate" | "max-age" "=" delta-seconds | cache-extension cache-extension= token ["=" ( token | quoted-string )] header Connection= 1*( connection-token ) connection-token= token header Content-Base= absoluteURI header Content-Encoding= 1*content-coding header Content-Language= 1*language-tag header Content-Length= 1*DIGIT header Content-Location= ( absoluteURI | relativeURI ) header Content-MD5= md5-digest md5-digest= *(word);TODO header Content-Range= content-range-spec content-range-spec= byte-content-range-spec byte-content-range-spec= bytes-unit SP first-byte-pos "-" last-byte-pos "/" entity-length entity-length= 1*DIGIT Content-Type= "Content-Type" ":" media-type header Date= HTTP-date header ETag= entity-tag header Expires= HTTP-date header Last-Modified= HTTP-date header Pragma= 1*pragma-directive pragma-directive= "no-cache" | extension-pragma extension-pragma= token ["=" ( token | quoted-string )] ranges-specifier= byte-ranges-specifier byte-ranges-specifier= bytes-unit "=" byte-range-set byte-range-set= 1*( byte-range-spec | suffix-byte-range-spec ) byte-range-spec= first-byte-pos "-" [last-byte-pos] first-byte-pos= 1*DIGIT last-byte-pos= 1*DIGIT suffix-byte-range-spec= "-" suffix-length suffix-length= 1*DIGIT ;header Keep-Alive= 0*keepalive-param ;keepalive-param= param-name "=" value ;param-name= header Transfer-Encoding= 1*transfer-coding header Upgrade= 1*product header Via= 1*( received-protocol received-by [comment] ) received-protocol= [protocol-name "/"] protocol-version protocol-name= token protocol-version= token received-by= ( host [":" port] ) | pseudonym pseudonym= token header URI= 1*( "<" URIspec">" ) header MIME-Version= 1*DIGIT "." 1*DIGIT header Content-Version= quoted-string header Derived-From= quoted-string header Link= *( "<" URIspec ">" *( ";" link-param ) ) link-param= ( ( "rel" "=" relationship ) | ( "rev" "=" relationship ) | ( "title" "=" quoted-string ) | ( "anchor" "=" DQUOTE URIspec DQUOTE ) | ( link-extension ) ) link-extension= token ["=" ( token | quoted-string )] relationship= sgml-name | ( DQUOTE sgml-name *( SP sgml-name ) DQUOTE ) sgml-name= ALPHA *( ALPHA | DIGIT | "." | "-" ) }