[ENH] HeaderFolding-klc ( v2 test added, minor change )

ken at kencausey.com ken at kencausey.com
Sat Mar 6 19:34:26 CET 2004


Frank,

First of all I want to thank you very much for your detailed analysis
and most especially for the included test.  This morning even before I
saw your email I thought to myself that I was remiss in not providing at
least one test case.

Now to reply to your comments:

"The last test fails because #ifNotEmpty: takes a one-argument block."

Yes, it does fail but this is not the reason.  First of all #ifNotEmpty:
uses #valueWithPossibleArgs which means that it is quite happy with a 0
argument block.  If you are actually seeing a problem there I bet you
have RB installed which rather rudely redefines ifNotEmpty: if I
remember correctly.

The failure I see is due to your comments regarding cr vs. crlf.  The
reason I did not specify crlf but instead cr is that I was following the
conventions of the rest of MailMessage which uses cr.  I have to admit I
did not track it down to confirm but it is my assumption that at some
later point in the process the linefeeds are inserted as necessary. 
This convention is relatively standard in Squeak where internally cr is
used and it is converted to crlf as needed just before leaving the
environs of Squeak.

I've taken the liberty of including your test case within the new
version of my enhancemnt I hope you don't mind.  I changed the test to
use String cr and it passes now.

"What happens if we have a really long line that can't be folded on
spaces (because, say, there aren't any)? I can't see what the RFC
actually says about that."

My reading is that header folding is completely optional.  The RFC
really only talks about it in the context of displaying on narrow screen
width terminals.  I've added this because other software in the chain
between the user and the BFAV2 archive would fold headers and often do
so incorrectly and destructively.  This change is merely to provide a
pre-emptive folding in the hopes of reducing the occurance of
destructive folding.  As I admit in the preamble this is a simplistic
change.  Folding anywhere other than a space is significantly more
complex as it depends on where it is safe to make a break and dependent
on the header, at least that is my understanding.  If this change
results in no folding we are no worse of than we were before.

Again, thank you for taking the time to look at this and for the test
case,

Ken

P.S. BFAV2 may not be working correctly, I've tried to attach the
changeset a couple of times now and the boxes don't change.  It's not
clear to me whether or not it is actually attached or not.  If there is
nothing attached I will send out another email to the server only with
the attachment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HeaderFolding-klc.cs.gz
Type: application/octet-stream
Size: 1724 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-harvest/attachments/20040306/1a5f859a/HeaderFolding-klc.cs.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HeaderFolding-klc.2.cs.gz
Type: application/octet-stream
Size: 1747 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-harvest/attachments/20040306/1a5f859a/HeaderFolding-klc.2.cs.obj


More information about the Squeak-harvest mailing list