W3C home > Mailing lists > Public > www-lib@w3.org > January to March 1999

Bug in HTMIME_put_block?

From: Ken Blackler <Ken.Blackler@jet.uk>
Date: Tue, 16 Feb 1999 14:06:39 -0000
Message-ID: <65EEE6367895D011B56C00805FD4979FA54FFA@jetnet-mail>
To: "'www-lib@w3.org'" <www-lib@w3.org>
I am new to libwww, so I may be wrong, but I think
there is a bug in the mime parser.
When parsing the headers the trace always shows
the first MIME token as part of the value string also:
    MIME header. Server: Server: name/version
or in another request:
    MIME header. WWW-Authenticate: WWW-Authenticate: Basic
Subsequent headers are parsed correctly.
Debugging the code (under Windows NT) shows that this is indeed
the case (and in my case the authentification fails to find an appropriate
handler). It appears that the "value" variable is not being initialised 
correctly the first time around the loop, it is being set to the start of
the headers "b" rather than NULL.
I changed the following line (in my copy of the code):
HTMime.c: (272)
    FROM: const char * value = HTChunk_size(me->value) >= 0 ? b : NULL;
    TO:      const char * value = HTChunk_size(me->value) > 0 ? b : NULL;
I am not sure of the reason for this line, why it is not always set to NULL,
so perhaps someone who knows the code better can explain / check my
change and check it in for me if this is correct.
With this change authentification works...
Thanks in advance,
-Ken Blackler
Received on Tuesday, 16 February 1999 09:07:12 UTC

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