Article View: news.software.readers
Article #86569Re: Q on unfolding headers
From: Curt Welch
Date: Fri, 02 Nov 2001 03:30
Date: Fri, 02 Nov 2001 03:30
50 lines
2998 bytes
2998 bytes
Luu Tran <luutran@geocities_.com.invalid> wrote: > From rfc822 > > << > The process of moving from this folded multiple-line > representation of a header field to its single line represen- > tation is called "unfolding". Unfolding is accomplished by > regarding CRLF immediately followed by a LWSP-char as > equivalent to the LWSP-char. > >> > > So only the CRLF should be removed, correct? I.e., > > X-1: foo<CRLF> > <WS>bar. > > should become > > X-1: foo bar. That's the way the spec is written. > The leading whitespace(s) should be kept intact, right? Right. In theory. > The reason I ask is that I've come across instances where keeping the > lwsp looks wrong. Either I'm misreading the RFC or the user-agent folded > the header incorrectly. In practice, I think you may find that you need to transform all whitespace before the CR LF, and after the CR LF into a single space. It's a problem because if everyone followed the spec, then you could be sure to get the correct single-line version of the header back, but since some don't, you don't know what to do. And when dealing with follow-ups of an article where some agents decided to fold the Subject, and add extra spaces, and others decided to un-fold using different algorithms, you end up with multiple version of the header which if you are sorting by the subject can cause problems. It's a tough call trying to figure out if you should follow the spec and have things not work (but hope that one day the broken clients will get fixed), or not follow the spec and have things generally work better - but then cause potential problems for clients trying to do the "right thing". -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<20011101223014.929$EI@newsreader.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!4.1.16.34!cpk-news-hub1.bbnplanet.com!news.gtei.net!newsfeed1.cidera.com!Cidera!feed1.newsreader.com!feed2.newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mailReferences:
<Xns914CB9717AB37luutrangeocities@207.126.101.97>Show Full Headers
Complete Article Headers
Message-ID: <20011101223014.929$EI@newsreader.com>
Subject: Re: Q on unfolding headers
Date: Fri, 02 Nov 2001 03:30:15 +0000
From: curt@kcwc.com (Curt Welch)
References: <Xns914CB9717AB37luutrangeocities@207.126.101.97>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!4.1.16.34!cpk-news-hub1.bbnplanet.com!news.gtei.net!newsfeed1.cidera.com!Cidera!feed1.newsreader.com!feed2.newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.readers
X-Trace: NewsReader.Com Y0_P8j5nn450g,P4HBwjJ@FdCA9ldoA1H_w_XO5DCFa-86@QWV
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
%IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 49