]> git.ipfire.org Git - thirdparty/patchwork.git/commit
parser: Ensure whitespace is stripped for long headers
authorStephen Finucane <stephen@that.guru>
Sun, 4 Nov 2018 14:06:03 +0000 (14:06 +0000)
committerStephen Finucane <stephen@that.guru>
Sat, 22 Dec 2018 18:04:21 +0000 (18:04 +0000)
commit841f966b8d54b2f51ab1c498eed6e5391f2546a9
tree620f1d78483455f6b06e27048d1e46a3a755b0c0
parentb1c2e80187008aff472c6509c67f44583cd3334c
parser: Ensure whitespace is stripped for long headers

RFC2822 states that long headers can be wrapped using CRLF followed by
WSP [1]. For example:

    Subject: Foo bar,
     baz

Should be parsed as:

    Foo bar,baz

While we were stripping the former, we were not stripping the
latter. This mean that we ended up with the following:

    Foo bar, baz

Resolve this.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Closes: #197
patchwork/parser.py
patchwork/tests/test_parser.py
releasenotes/notes/issue-197-4f7594db1e4c9887.yaml [new file with mode: 0644]