Ticket #123 (closed defect)

Opened 17 months ago

Last modified 17 months ago

[PATCH] Exceptions from FastCGI

Reported by: brmichel Owned by: why
Priority: major Milestone: Camping 1.6
Component: camping/fastcgi.rb Version:
Keywords: Cc:

Description

Some exceptions raised by FastCGI on signals are not handled correctly:

  • if a connection is closed while camping is serving it, FastCGI raises an exception on broken pipe; camping rescues this exception and tries to send a page with a 500 error, thus another broken pipe,
  • camping do not exits if it receives a SIGTERM while serving a request.

My patch fixes those problem, but I'm not sure if FastCGI uses other signals for its own usage.

Attachments

fix_double_broken_pipe.diff (2.0 kB) - added by brmichel 17 months ago.

Change History

Changed 17 months ago by brmichel

Changed 17 months ago by brmichel

  • summary changed from Exceptions from FastCGI to [PATCH] Exceptions from FastCGI

Changed 17 months ago by zimbatm

This has to be discussed. I think that rescuing the StandardError? in camping should be enough. So the code can be written as such :

rescue => ex
  # ...
end

As described here : http://www.zenspider.com/Languages/Ruby/QuickRef.html#34, Interrupt and parsing errors will not be catched.

I think that ScriptError? should be handled by the Camping::Reloader and the rest by the adapter.

Changed 17 months ago by why

  • status changed from new to closed

Good suggestions both from brmichel and zimbatm. I have combined in [191].

Note: See TracTickets for help on using tickets.