]> 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 22:35:48 +0000 (22:35 +0000)
commitaa6f4f0385a3deae8925615ccfcc4fb262e819a1
tree40b53cbd4971986afa607aa5a0bb7f6370a81194
parent413bd043df90d22d38a01bc79b64d96e9dba5d3c
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
(cherry picked from commit 841f966b8d54b2f51ab1c498eed6e5391f2546a9)
patchwork/parser.py
patchwork/tests/test_parser.py
releasenotes/notes/issue-197-4f7594db1e4c9887.yaml [new file with mode: 0644]