strip trailing and leading linear whitespace in headers
commitc73e5023a056e28543869722203d9f62d75e3949
authorEric Wong <normalperson@yhbt.net>
Tue, 24 May 2011 00:11:29 +0000 (23 17:11 -0700)
committerEric Wong <normalperson@yhbt.net>
Tue, 24 May 2011 00:11:29 +0000 (23 17:11 -0700)
tree99fa296c41f8e570a95389ef199348872bb6a2f3
parent71bb4732573c45b91b88922df3e13160af6f65c6
strip trailing and leading linear whitespace in headers

RFC 2616, section 4.2:
> The field-content does not include any leading or trailing LWS:
> linear white space occurring before the first non-whitespace
> character of the field-value or after the last non-whitespace
> character of the field-value. Such leading or trailing LWS MAY be
> removed without changing the semantics of the field value. Any LWS
> that occurs between field-content MAY be replaced with a single SP
> before interpreting the field value or forwarding the message
> downstream.
ext/kcar/kcar.rl
ext/kcar/kcar_http_common.rl
test/test_parser.rb