Forum: Ruby WEBrick detect http client disconnect

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4390243134599ef6a5da11851a2146b1?d=identicon&s=25 topgun300 (Guest)
on 2008-10-31 20:30
(Received via mailing list)
Hello all:

I'm working on a REST-like web service using WEBrick servlets
(HTTPServer and AbstractServet).

Does anybody know how the HTTPServer could detect when a client closes
their http session with the server.  I would like for the web-server
to "clean up" data associated with the client automatically in the
event of a disconnect.

I've tried several methods already (GenericServer#{config,listeners,
et al} ) to no avail.

Thanks for your time,
Dave
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2008-10-31 23:06
(Received via mailing list)
On Oct 31, 2008, at 12:29 PM, topgun300 wrote:
> I'm working on a REST-like web service using WEBrick servlets
> (HTTPServer and AbstractServet).
>
> Does anybody know how the HTTPServer could detect when a client closes
> their http session with the server.  I would like for the web-server
> to "clean up" data associated with the client automatically in the
> event of a disconnect.

Aren't HTTP connections are supposed to be stateless?
This topic is locked and can not be replied to.