When I send a PUT or DELETE request to a Rails/lighttpd/fastcgi setup, I get a 501 (method not supported) status code back. This seems to be something lighttpd is doing because I don''t see any indication that the request is making it through to the fastcgi process and definitely not to Rails. All other configurations I''ve tested (Apache, WEBrick) support the full range of HTTP verbs and the AbstractRequest class also has some basic methods for determining the HTTP verb (e.g., request.put?, request.delete?). I stumbled on this [1] page on lighttpd.net, which seems to suggest this is a feature. Under "HTTP/1.1 compliance", it says "Sends 501 for request-method != (GET|POST|HEAD)". Has anyone else run into this and does anyone know if this "feature" can be disabled such that PUT and DELETE requests get passed through to the fastcgi process? I apologize if this is off topic. I''ll take it to the lighttpd mailing list if no one here has run into this. I figured someone may have stumbled on the same issue since there seems to be a lot of people using lighttpd configurations. [1]: http://www.lighttpd.net/modules/ Thanks, Ryan Tomayko rtomayko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://naeblis.cx/rtomayko/ http://lesscode.org/
Julian ''Julik'' Tarkhanov
2005-Oct-07 17:23 UTC
Re: lighttpd disallows PUT/DELETE requests?
On 6-okt-2005, at 1:11, Ryan Tomayko wrote:> When I send a PUT or DELETE request to a Rails/lighttpd/fastcgi > setup, I get a 501 (method not supported) status code back. This > seems to be something lighttpd is doing because I don''t see any > indication that the request is making it through to the fastcgi > process and definitely not to Rails. > > All other configurations I''ve tested (Apache, WEBrick) support the > full range of HTTP verbs and the AbstractRequest class also has > some basic methods for determining the HTTP verb (e.g., > request.put?, request.delete?). > > I stumbled on this [1] page on lighttpd.net, which seems to suggest > this is a feature. Under "HTTP/1.1 compliance", it says "Sends 501 > for request-method != (GET|POST|HEAD)". > > Has anyone else run into this and does anyone know if this > "feature" can be disabled such that PUT and DELETE requests get > passed through to the fastcgi process? > > I apologize if this is off topic. I''ll take it to the lighttpd > mailing list if no one here has run into this. I figured someone > may have stumbled on the same issue since there seems to be a lot > of people using lighttpd configurations.When this kind of problems appear I find it most helpful to consult the fine folks on lighttpd IRC channel - everything gets resolved quite quickly. -- Julian "Julik" Tarkhanov