I'm getting lot's of these exception开发者_如何转开发s in a Rails application:
ActionController::UnknownHttpMethod: CONNECT, accepted HTTP methods are get, head, put, post, delete, and options
As far as I see it seems to be some crawler or something like that trying to use CONNECT as an http verb. I've never heard of it, but the documentation say:
This specification reserves the method name CONNECT for use with a proxy that can dynamically switch to being a tunnel (e.g. SSL tunneling [44]).
Any ideas what might be going on? Some poorly written crawler? Something trying to abuse my application or web server? What can I do about it? Totally block them, if so how? This is a Ruby on Rails app running with Passenger on Apache.
Are all the requests coming from the same IP or hostname? If so I would use Apache's mod_authz_host mod_access to deny access to the, most likely, crawler. Since Rails doesn't seem to be doing anything with the request I wouldn't worry about it too much though :)
精彩评论