Re: bug? in quoted-printable handling?

From: Bjarni R. Einarsson (
Date: Wed 16 Jan 2002 - 16:54:33 UTC

  • Next message: Brett Simpson: "Recommended virus scanner programs."

    On 2002-01-16, 17:06:32 (+0000), Dave Cridland wrote:
    > I'll look into providing a QP decoder and encoder which will produce the
    > same output as the input...


     - Receive the word "bjarni", with the "a" encoded for No Good Reason.
     - Remember that the "a" was encoded.
     - Re-encode "a" in "bjarni" on the way out.

    Hint: You'll need to keep a copy of the original, unmodified content
    in a buffer somewhere along with "checkpoint" info so you know when
    whatever's going out corrosponds with whatever is in the stored "in"
    buffer. When content is modified (e.g. by the HTML cleaner) you need
    to discard the now worthless "in" buffer...

    Personally, I think this is such an ugly hack that I've resisted
    doing it until now. I'm still resisting, but if perusal of the MIME
    standards indicates that what Anomy is doing today violates the
    standards then I'll probably give in. Otherwise... I'm not sure. :)

    This may also be non-trivial given the layered encoding/decoding
    going on in the current Sanitizer.

    > It strikes me that where Anomy Sanitizer is not intending to change the
    > attachment, it should not be doing so, and while it may not be a bug
    > exactly, it's certainly not a required effect.

    Agreed - I take pains in the Base64 decoding/encoding to do more
    than just comply with the standards for this reason. But it's
    important to balance this against the need for clean, simple, fast,
    understandable code...

    The more if() statements we put in the encoding/decoding routine,
    the slower the Sanitizer will run.

    Bjarni R. Einarsson                           PGP: 02764305, B7A3AB89                -><-    

    Check out my open-source email sanitizer: Spammers, please send plenty of email to:

    hosted by