This module contains a few information about HTTP Specification.
Procs
proc checkFieldName(s: string) {...}{.raises: [ValueError], tags: [].}
-
Checks if s is a valid name of a HTTP header field.
DIGIT = %x30-39 ; 0-9 ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
field-name = token token = 1*tchar tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA ; any VCHAR, except delimiters
Source Edit proc checkFieldValue(s: string) {...}{.raises: [ValueError], tags: [].}
-
Checks if s is a valid value of a HTTP header field.
HTAB = %x09 ; horizontal tab SP = %x20 ; ' ' VCHAR = %x21-7E ; visible (printing) characters
field-value = \*( field-content / obs-fold ) field-content = field-vchar [ 1\*( SP / HTAB ) field-vchar ] field-vchar = VCHAR / obs-text obs-text = %x80-FF obs-fold = CRLF 1\*( SP / HTAB ) ; obsolete line folding
Source Edit