# PUT request via HTTPS not handled properly

**URL:** <https://www.ruby-forum.com/t/put-request-via-https-not-handled-properly/202058>\
**Category:** Rails\
**Created:** [January 20, 2011, 7:04pm UTC](https://www.ruby-forum.com/t/put-request-via-https-not-handled-properly/202058 "2011-01-20T19:04:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [January 20, 2011, 7:04pm UTC](https://www.ruby-forum.com/t/put-request-via-https-not-handled-properly/202058/1 "2011-01-20T19:04:10Z")

</div>

I’ve started to create a very basic rails app. It basically outputs  
the body of an incoming HTTP PUT request to the console.  
Unfortunately, it only handles HTTP requests and completely ignores  
HTTPS requests.

Do I have anything special to my Rails 3 routes.rb. It currently looks  
like this:

PutTest::Application.routes.draw do

controller :put\_test do  
match ‘put’, :to =\> :update, :via =\> [:put]  
end  
end

I don’t see the controller handling incoming HTTPS PUT requests.  
Everything works fine with HTTP PUT requests.

Your help is greatly appreciated!

---

<div class="post-metadata">

**Author:** ![24z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/2/e95f7d/32.png) [@24z](https://www.ruby-forum.com/u/24z)\
**Post date:** [January 20, 2011, 8:47pm UTC](https://www.ruby-forum.com/t/put-request-via-https-not-handled-properly/202058/2 "2011-01-20T20:47:15Z")

</div>

24z wrote in post #976330:

> Do I have anything special to my Rails 3 routes.rb. It currently looks  
> like this:
> 
> PutTest::Application.routes.draw do
> 
> controller :put\_test do  
> match ‘put’, :to =\> :update, :via =\> [:put]  
> end  
> end

Unless my understanding of the Rails 3 routing syntax is complete wrong,  
the above route makes no sense.

Shouldn’t it look more like the following?

match ‘put\_test/update’ =\> ‘put\_test#update’, :via =\> :put

or the shorthand

put ‘put\_test/update’

---

<div class="post-metadata">

**Author:** ![24z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/2/e95f7d/32.png) [@24z](https://www.ruby-forum.com/u/24z)\
**Post date:** [January 20, 2011, 9:30pm UTC](https://www.ruby-forum.com/t/put-request-via-https-not-handled-properly/202058/3 "2011-01-20T21:30:18Z")

</div>

Yeah, the original syntax makes no sense unfortunately. If you do want  
to  
invoke per controller routing, it needs to be through:

resources :controllername do

## do stuff

end
