W3C home > Mailing lists > Public > www-lib@w3.org > April to June 1999

Re: basic authentication broken on Windows

From: Raffaele Sena <raff@nuvomedia.com>
Date: Wed, 16 Jun 1999 18:28:43 -0700
Message-ID: <020401beb860$bcfb2760$52c0a8c0@nuvomedia.com>
To: "libwww" <www-lib@w3.org>
Well, I think I found what it is, and I fixed it (in some way).

What was happening is that after receiving the 401 and setting the
http->result to -401,
the next event received on Linux was HTEvent_READ that caused HTTPEvent() to
try a read
and decide the connection was closed. This ended up in correctly parsing
the -401.

On Windows (maybe because the page I was trying to access, because I'm sure I
this a long time ago and it worked) the next event after 401 was
This caused the initial code in HTTPEvent to do an HTTPCleanup() with status
(and consequently to not process the filter for the authentication error).

I changed the code to do a HTTPCleanup with the current result stored in
and everything seems to work, both on Linux and Windows, for authenticated
pages or
regular pages.

Is this the correct fix or am I missing something ?



------------------------ 8< CUT HERE >8 -------------------------------

cvs diff HTTP.c (in directory c:\SOFTWAREDEV\LIBWWW\Library\src\)
Index: HTTP.c
RCS file: /sources/public/libwww/Library/src/HTTP.c,v
retrieving revision 1.182
diff -r1.182 HTTP.c
<      HTTPCleanup(request, HT_LOADED);
>      HTTPCleanup(request, http->result); /* was HT_LOADED */
Received on Wednesday, 16 June 1999 21:27:51 UTC

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