Hi,

The Jetty webserver has no API for notification of lost connections
while sending responses to clients. However, writing to an
outputstream of a response that has been closed throws an Exception.
(A org.eclipse.jetty.io.EofException). On Heroku writing to an
outputstream of a closed response does not throw an exception.

The example below explains to problem in more detail:

The example app is here:
https://github.com/thegeez/jetty-test/blob/master/src/jetty_test/core.clj

Run server locally or on a dedicated server:
lein run -m jetty-test.core

Make a request for a streaming response:
curl -vv http://localhost:8080/

When closing the connection with Ctrl-c the server output show
"CONNECTION LOST"

Make a request to this example running on Heroku:
curl http://radiant-fire-4939.herokuapp.com/

When closing the connection with Ctrl-c the server log (heroku logs
-t) shows after ~50 seconds:
"End of stream"


My question is if there is anyway to get this working such that Jetty
on Heroku also throws an Exception when the connection is closed.

If anybody knows a Java webserver that does report disconnects of
responses that works on Heroku, I'd also be happy to hear it.

Best regards,
Gijs

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to