#104 ✓resolved
Graham Batty

PATCH: FastCGI handler should not bind to a TCPSocket when a File option is given to it

Reported by Graham Batty | December 2nd, 2010 @ 03:46 AM

Currently if both a Port and File option are passed to the FastCGI handler, the handler will first bind to the domain socket and replace the correct fd with that, then it will bind to the TCP port, and re-replace the fd with that one. This causes it to be wasteful of resources (it binds to two different kinds of socket but only uses one) and makes it so that if the application passes in default port/host options (as, for example, rackup does) it is impossible to cause the server to correctly listen on the domain socket.

The patch fixes this by giving priority to a File option if given. Note that writing a spec for this could prove complicated due to the way the spec currently works, so I have not done so yet. If it's required to get this fix included, though, I will do so ASAP.

Patch is also available on my github branch for issue #44 at: https://github.com/stormbrew/rack/commit/996e8cbf24db14b9a83eaa5f35...

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket