When a PR contains a string like this (I've indented the string by four spaces please ignore this):
>Comments: our customer freaked out
blah blah blah and then he said
> I won't take this any longer!
The ">Comments:" is a legal field, but the "> I wont" will be used in a split.
An even worse example:
>From: dan.draper@madmen.com
>To: all@madmen.com
I really like this jingle!
When these strings are parsed by Gnats::PR::setFromString(), it gets confused as it splits on /^>/m. A better approach would be to split on
/^>([^:\s\r\t]):/, and then iterate through the resulting array using alternating entries as the field keys.
An even better solution would first probe the PR for the list of legal fields and use that to form a the splitting regexp.
JimQ
Verified this is issue and test has been added: t/regress_11.t.
Note the problem is far worse than noted in the filing - whole multiline blocks can be disregarded.
Diff:
I have fixed this issue by rewriting the parse routine. There were several oversights in both Net::Gnats::PR and gnatsweb where the code was originally derived.