From: Martin Kuba <[EMAIL PROTECTED]>
> following servlet hangs my JServ 1.1 :....
>
This is proper behavior. Whether it hangs or not depends on the browser. If
the browser transmits a content-length header it will not hang, if it
doesn't transmit one it will hang. You just can't read arbitrary length data
from a browser reliably.
EOF detection is unreliable with browsers if they don't transmit
content-length headers. You are hung because you issued a socket read to the
browser when the browser had no more data to send. Without the
content-length header you can't tell when to stop reading -- how is JServ
going to know when to signal EOF?
Open ended reading is used when a browser is implementing an intermittent
push protocol back to the server. It is legal with HTTP to open a socket,
send some data, wait 30 seconds, send more, data and so on in a loop
forever. This is how push protocols work.
If the browser had transmitted a content-length header JServ will properly
signal EOF and you won't hang.
Anyway, you are not really hung. After a while the socket will timeout and
you'll get a socket exception.
Jon Smirl
[EMAIL PROTECTED]
--
----------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]