Skip Menu |
 

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 111419
Status: resolved
Priority: 0/
Queue: Encode

People
Owner: Nobody in particular
Requestors: florz [...] florz.de
Cc: pali [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: incorrect unfolding and other decoding bugs
Date: Mon, 25 Jan 2016 17:40:08 +0100
To: bug-Encode [...] rt.cpan.org
From: Florian Zumbiehl <florz [...] florz.de>
Download (untitled) / with headers
text/plain 180b
Bug #67569 has been marked as resolved even though the bug obviously hasn't been fixed. For explanation and patch, see there: https://rt.cpan.org/Public/Bug/Display.html?id=67569
Download (untitled) / with headers
text/plain 682b
On Mon Jan 25 11:40:29 2016, florz@florz.de wrote: Show quoted text
> Bug #67569 has been marked as resolved even though the bug obviously hasn't > been fixed. For explanation and patch, see there: > > https://rt.cpan.org/Public/Bug/Display.html?id=67569
I've added all test vectors in RFC2047, pp.11-12 https://github.com/dankogai/p5-encode/commit/b0d30fbf504b69caad5cc43b5c25c9a3b0166fa1 And Encode 2.80 passes all that. Plus so far as I see some of your test vectors are wrong. For instance "=?us-ascii?q?foo?=\r\n bar" => "foo bar" Should be "foobar", not "foo bar". That is a single line when decoded and in such cases the leading white spaces immediately after CRLF is ignored. Dan
Subject: Re: [rt.cpan.org #111419] incorrect unfolding and other decoding bugs
Date: Mon, 25 Jan 2016 18:57:14 +0100
To: Dan Kogai via RT <bug-Encode [...] rt.cpan.org>
From: Florian Zumbiehl <florz [...] florz.de>
Download (untitled) / with headers
text/plain 1.1k
Hi, Show quoted text
> Plus so far as I see some of your test vectors are wrong. For instance
Yes, I think some are, and as I wrote a long time ago, I'd be happy to fix those if there is any chance that the fix will actually get merged. Show quoted text
> "=?us-ascii?q?foo?=\r\n bar" => "foo bar" > > Should be "foobar", not "foo bar". That is a single line when decoded and in such cases the leading white spaces immediately after CRLF is ignored.
That one is actually correct. Could you point to where in the relevant RFCs you think the behavior you suggest is specified? You might want to start reading at sections 2.2.3 and 3.2.2 of RFC 5322, the former of which this quote is from: | The process of moving from this folded multiple-line representation | of a header field to its single line representation is called | "unfolding". Unfolding is accomplished by simply removing any CRLF | that is immediately followed by WSP. Each header field should be | treated in its unfolded form for further syntactic and semantic | evaluation. An unfolded header field has no length restriction and | therefore may be indeterminately long. Regards, Florian
Subject: Re: [rt.cpan.org #111419] incorrect unfolding and other decoding bugs
Date: Fri, 29 Jan 2016 02:54:30 +0100
To: Dan Kogai via RT <bug-Encode [...] rt.cpan.org>
From: Florian Zumbiehl <florz [...] florz.de>
Download (untitled) / with headers
text/plain 433b
Hi, BTW, I just checked, these are the two that arguably are wrong: "=?us-ascii?q?foo?==?us-ascii?q?bar?=" => "foo=?us-ascii?q?bar?=" "foo =?us-ascii?q?=20?==?us-ascii?q?bar?=" => "foo =?us-ascii?q?bar?=" Though it's not really clear whether they are indeed wrong, as RFC2047 is somewhat ambiguous there. All the other examples are definitely correct. So, is there any chance you will finally merge the fix? Regards, Florian
I suppose that this bug is finnaly fixed in version 2.83
Download (untitled) / with headers
text/plain 101b
On Tue Mar 29 14:36:15 2016, PALI wrote: Show quoted text
> I suppose that this bug is finnaly fixed in version 2.83


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.