# ActionController::UnknownHttpMethod: \*\*\*, accepted HTTP methods are get, head, put, post, delete, a

**URL:** <https://www.ruby-forum.com/t/actioncontroller-accepted-http-methods-are-get-head-put-post-delete-a/185897>\
**Category:** Rails\
**Created:** [March 28, 2010, 8:42pm UTC](https://www.ruby-forum.com/t/actioncontroller-accepted-http-methods-are-get-head-put-post-delete-a/185897 "2010-03-28T20:42:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jemminger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c0e974/32.png) [@jemminger](https://www.ruby-forum.com/u/jemminger)\
**Post date:** [March 28, 2010, 8:42pm UTC](https://www.ruby-forum.com/t/actioncontroller-accepted-http-methods-are-get-head-put-post-delete-a/185897/1 "2010-03-28T20:42:48Z")

</div>

I’m occasionally getting exception notices with this error message:

ActionController::UnknownHttpMethod: \*\*\*, accepted HTTP methods are  
get, head, put, post, delete, and options

Anyone ever seen this or know what could be causing it?

Thanks,  
Jeff

---

<div class="post-metadata">

**Author:** ![jemminger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c0e974/32.png) [@jemminger](https://www.ruby-forum.com/u/jemminger)\
**Post date:** [April 7, 2010, 11:17pm UTC](https://www.ruby-forum.com/t/actioncontroller-accepted-http-methods-are-get-head-put-post-delete-a/185897/2 "2010-04-07T23:17:27Z")

</div>

Got two of these on one of our sites today within seconds. My guess is  
that it’s a bot scanning for vulnerabilities on the site.

Error: ActionController::UnknownHttpMethod: CONNECT, accepted HTTP  
methods are get, head, put, post, delete, and options  
Action: Internal  
URL: [http://mail.messaging.microsoft.com:25/](http://mail.messaging.microsoft.com:25/)  
Parameters: {“action”=\>“”, “controller”=\>“”}  
File: [GEM\_ROOT]/gems/actionpack-2.3.5/lib/action\_controller/  
request.rb:35

Error: ActionController::UnknownHttpMethod: CONNECT, accepted HTTP  
methods are get, head, put, post, delete, and options  
Action: Internal  
URL: [http://www.google.com:443/](http://www.google.com:443/)  
Parameters: {“action”=\>“”, “controller”=\>“”}  
File: [GEM\_ROOT]/gems/actionpack-2.3.5/lib/action\_controller/  
request.rb:35

I would also like to hear from others experiencing this, and if any  
precautions should be taken…

/nikolaj

---

<div class="post-metadata">

**Author:** ![jemminger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c0e974/32.png) [@jemminger](https://www.ruby-forum.com/u/jemminger)\
**Post date:** [May 15, 2010, 4:21am UTC](https://www.ruby-forum.com/t/actioncontroller-accepted-http-methods-are-get-head-put-post-delete-a/185897/3 "2010-05-15T04:21:52Z")

</div>

Still getting a slew of these on one of my sites. Annoying, because  
you can’t seem to trap it with the normal rescue\_from in  
application\_controller, as Rails seems to intercept this exception  
before it ever makes it that far up the chain.

---

<div class="post-metadata">

**Author:** ![jemminger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c0e974/32.png) [@jemminger](https://www.ruby-forum.com/u/jemminger)\
**Post date:** [May 15, 2010, 5:06pm UTC](https://www.ruby-forum.com/t/actioncontroller-accepted-http-methods-are-get-head-put-post-delete-a/185897/4 "2010-05-15T17:06:53Z")

</div>

On Fri, May 14, 2010 at 7:20 PM, jemminger [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Still getting a slew of these on one of my sites. Annoying, because  
> you can’t seem to trap it with the normal rescue\_from in  
> application\_controller, as Rails seems to intercept this exception  
> before it ever makes it that far up the chain.

Seems like this might be a good use case for a Rack filter: intercept  
the bad request earlier and discard/log/whatever…

–  
Hassan S. ------------------------ removed\_email\_address@domain.invalid  
twitter: @hassan
