This project is archived and is in readonly mode.
Allow mounting of rack apps that deal with HTTP extensions
Reported by clyfe | October 30th, 2010 @ 04:17 PM | in 3.0.2
I have a rack app that handles webdav request. I cannot mount it from inside rails like this;
HelloWebdavApp::Application.routes.draw do |map|
match '/webdav', :to => WebdavApp
end
because rails validates HTTP verbs (GET POST PUT ..), and webdav uses HTTP extensions like PROPFIND that do not validate, throwing the following exception:
ActionController::UnknownHttpMethod (PROPFIND, accepted HTTP methods are get, head, put, post, delete, and options)
I see 2 possible fixes:
Either allow rack mounting semantics to say "mount this but above HelloWebdavApp.routes" either change the validation code to allow http extensions verbs.
More background here: http://stackoverflow.com/questions/4009082/rails-3-http-extensions-...
Related ticket: https://rails.lighthouseapp.com/projects/8994/tickets/2809-patch-al...
Comments and changes to this ticket
-
Andrew White November 1st, 2010 @ 04:08 PM
- State changed from new to open
- Milestone set to 3.0.2
- Assigned user set to Andrew White
- Importance changed from to Low
I'm working on fixing this, however in the meantime putting the following in an initializer should work:
%w(propfind proppatch mkcol copy move lock unlock).each do |method| ActionDispatch::Request::HTTP_METHODS << method.upcase ActionDispatch::Request::HTTP_METHOD_LOOKUP[method.upcase] = method.to_sym end
-
Repository November 2nd, 2010 @ 11:09 AM
- State changed from open to resolved
(from [6c8982fa137421eebdc55560d5ebd52703b65c65]) Add additional HTTP request methods from the following RFCs:
-
Hypertext Transfer Protocol -- HTTP/1.1 http://www.ietf.org/rfc/rfc2616.txt)
-
HTTP Extensions for Distributed Authoring -- WEBDAV http://www.ietf.org/rfc/rfc2518.txt
-
Versioning Extensions to WebDAV http://www.ietf.org/rfc/rfc3253.txt
-
Ordered Collections Protocol (WebDAV) http://www.ietf.org/rfc/rfc3648.txt
-
Web Distributed Authoring and Versioning (WebDAV) Access Control Protocol http://www.ietf.org/rfc/rfc3744.txt
-
Web Distributed Authoring and Versioning (WebDAV) SEARCH http://www.ietf.org/rfc/rfc5323.txt
-
PATCH Method for HTTP http://www.ietf.org/rfc/rfc5789.txt
[#2809 state:resolved] [#5895 state:resolved] http://github.com/rails/rails/commit/6c8982fa137421eebdc55560d5ebd5...
-
Repository November 2nd, 2010 @ 11:09 AM
(from [d446392f76c063d9f04396a1d3ca9e314a521671]) Add additional HTTP request methods from the following RFCs:
-
Hypertext Transfer Protocol -- HTTP/1.1 http://www.ietf.org/rfc/rfc2616.txt)
-
HTTP Extensions for Distributed Authoring -- WEBDAV http://www.ietf.org/rfc/rfc2518.txt
-
Versioning Extensions to WebDAV http://www.ietf.org/rfc/rfc3253.txt
-
Ordered Collections Protocol (WebDAV) http://www.ietf.org/rfc/rfc3648.txt
-
Web Distributed Authoring and Versioning (WebDAV) Access Control Protocol http://www.ietf.org/rfc/rfc3744.txt
-
Web Distributed Authoring and Versioning (WebDAV) SEARCH http://www.ietf.org/rfc/rfc5323.txt
-
PATCH Method for HTTP http://www.ietf.org/rfc/rfc5789.txt
[#2809 state:resolved] [#5895 state:resolved] http://github.com/rails/rails/commit/d446392f76c063d9f04396a1d3ca9e...
-
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Tags
Referenced by
- 5895 Allow mounting of rack apps that deal with HTTP extensions [#2809 state:resolved] [#5895 state:resolved] http://git...
- 2809 [PATCH] Allowed controlled addition of new http methods [#2809 state:resolved] [#5895 state:resolved] http://git...
- 2809 [PATCH] Allowed controlled addition of new http methods [#2809 state:resolved] [#5895 state:resolved] http://git...
- 5895 Allow mounting of rack apps that deal with HTTP extensions [#2809 state:resolved] [#5895 state:resolved] http://git...