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

Change to libwww-ssl\HTSSLReader.c for review

From: Marco Ariano <marco.ariano@pipercreek.com>
Date: Thu, 22 Jul 1999 18:43:25 -0600
Message-ID: <3797BAAD.A2A5374A@pipercreek.com>
To: www-lib@w3.org
I'd like to suggest a change to libwww-ssl\HTSSLReader.c although I must
confess to not _really_ knowing what I'm doing with this package yet. 

[Brief pause while I don my fireproof suit...]

I'd like to suggest changing line 74 of libwww-ssl\HTSSLReader.c from

	HTHost_setCloseNotification (me->host, YES);

	HTHost_clearChannel (me->host, HT_OK);

Without the change, the first GET over SSL (to an HTTP 1.1 server) would
work fine but on attempting a second I'd find myself staring at an
access violation window when referencing the argument to

Here's what I believe was happening...  After the first request was
successfully handled, HTSSLReader_free() calls the
HTHost_setCloseNotification() line above.  The second GET request
eventually calls HTHost_addNet() which puts the request in the pending
queue.  Pending because _roomInPipe() returns NO due to the check of
HTHost_closeNotification().  Note that the request shouldn't be made
pending because there's really nothing left to do.

Eventually the host closes the connection because there's been no action
for a while.  Now things kick into action to satisfy the pending
request.  HTHost_clearChannel cacks when it tries to launch the pending
reqeust.  The request object is just garbage at this point. 

I figure the proposed change achieves what HTSSLReader_free() wanted and
still keeps the rest of libwww happy.  With the change, the second
request is serviced as soon as possible.  That makes me happy but since
I'm just a newbie with this package, I can't be sure that my solution is
the correct one.

Anyone see a problem with this solution?  Anyone care?  :-)

Received on Thursday, 22 July 1999 20:45:05 UTC

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