[ENH] HeaderFolding-klc ( v2 test added, minor change )
Frank Shearar
frank at angband.za.org
Sat Mar 6 22:48:14 CET 2004
On Sat, 6 Mar 2004 18:34:26 +0000 (GMT), ken wrote
> Frank,
>
> First of all I want to thank you very much for your detailed analysis
> and most especially for the included test.
You're welcome. I rather like writing tests just for the sake of understanding
the behaviour of new code.
> If you are actually seeing a problem there I
> bet you have RB installed which rather rudely redefines ifNotEmpty:
> if I remember correctly.
Ah, I do indeed have RB installed.
> 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.
Ah, that's what I'd thought.
> 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.
That's what tests are for, after all!
> "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.
Hm, yes, not ideal, but then, I can't think of any way to reasonably fold a
line without any spaces. Not in any general way, at least. I'd hoped I was
just not reading properly and had missed something. Personally, I'd like it if
folding just never took place, and clients would handle very long lines as a
matter of course.
> Again, thank you for taking the time to look at this and for the test
> case,
No problem :)
> 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.
Yes, I've noticed that problem too. I'm trying to track down the problem right
now, in fact. I suddenly realised that being co-maintainer for a package means
that I can't just post bug reports :)
frank
More information about the Squeak-harvest
mailing list