hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rae Egli <re...@yahoo.com>
Subject NIO HttpCore - Can requestInput result in two new requests
Date Fri, 15 Aug 2008 21:57:18 GMT
I modified the NHttpReverseProxy slightly to act as a normal proxy.  

What I am encountering is the strange situation that I receive two requests.  One from an
already open connection (conn1) in requestReceived() and the other from a new conection (conn2).. 

 
There is a first a perfect sequence from conn1 to originConn (google:80).  At he end of that
sequence, outputReady issues requestinput().  Seems just fine.
 
Then on conn1 a second request arrives from the browser as the connection isn't closed. At
the end of requestReceived a client suspendInput() on conn1 is issued which should prevent
acceptance of another connections, right?  However, I get a second connect now from a newly
opened connection (conn2).  As the first origin request hasn't completed yet, the program
terminates with a status failure.
 
I am attaching a log of the issue which might make the sequence of events easier to understand. 
Scan further down for the key events with comments.
 
Shouldn't the suspendInput prevent any other I/O requests from occurring?  Could it be that
when the new request comes from an already open connection that a second one from a new connection
is not stopped?
 
Thanks very much for any help in the matter.
 
Rae 
Mime
View raw message