W3C home > Mailing lists > Public > www-lib@w3.org > July to September 2000

PATCH: Retaining truly _original_ headers

From: Peter Stamfest <peter.stamfest@eunet.at>
Date: Tue, 5 Sep 2000 16:21:51 +0200 (CEST)
To: www-lib@w3.org
Message-ID: <Pine.LNX.4.21.0009051611270.8066-200000@peter.stamf.pr.at>

Hello everybody, 

The attached patch corrects what I would call a bug (It cannot be a
feature). It regards the handling of the stored original headers in
HTAnchor and HTResponse. Both object types provide for specialized
routines to access the values of various header lines. However, those
routines destroy the header values by inserting a lot of 0-bytes. Thus,
when trying to access the original headers (To store them away, to return
them for a TRACE request, whatever), they are already destroyed, because
some of those specialized routines get called internally by libwww.

The attached patch corrects this by introducting and using a new parsing
function (actually just a variant of the original function).

If any code that uses libwww is broken by this change, I would call the
user code buggy, because it may use incomplete header information at

There are a lot of uses of the HTNextField function in other parts of the
library. I did not check if there is a similar problem lurking in those
parts of the library as well. If somebody could check thise cases, please
do so and tell me your results.

The patch should apply cleanly within Library/src


Received on Tuesday, 5 September 2000 10:23:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:53 UTC