Change to libwww-ssl\HTSSLReader.c for review

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. 
Nevertheless...

[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);
to

	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
HTAnchor_physical().  

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?  :-)

thanks,
Marco

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