This project is archived and is in readonly mode.
[PATCH] Allowed controlled addition of new http methods
Reported by Rick DeNatale | June 16th, 2009 @ 09:41 PM | in 3.x
Certain IETF RFCs such as WebDav (RFC 4918) or CalDav (RFC 4791) extend the HTTP protocol by adding additional methods.
In order to support these APIs with a Rails based server it is necessary to extend Rails to recognize these additional http methods. To date this has required 'monkey patching' rails.
For example there is a railsdav plugin
http://github.com/stueccles/railsdav/tree/master
Another example can be found here http://rails.learnhub.com/lesson/2318-dealing-with-microsoft-office...
It is interesting to note that these actually patch different aspects of Rails and neither covers the need completely.
The current Rails code base defines three different globals
which contain an array of valid http method names. One place is in
the Routing code, which determines which methods may be used in the
:conditions=>:method option in building routes, and which
methods can affect route recogition. There is another list in
ActionDispatch::Request.
Rails 2.3 introduced a third in the Rack middleware which processes
method overrides in post requests.
This makes the job of patching rails to implement a protocol with additional methods error prone.
This patch consolidates the three globals and introduces methods on the ActionController::Routes module for accessing, adding to, and removing from (the last primarily for tests) allowable http methods.
Comments and changes to this ticket
-
Tony Amoyal December 17th, 2009 @ 08:44 PM
Thank you for this! When will this patch be applied to the Rails core?
-
Dan Pickett May 9th, 2010 @ 07:05 PM
- Tag changed from dispatching, patch, routing, webcal, webdav to bugmash, dispatching, patch, routing, webcal, webdav
-
Andrew White June 28th, 2010 @ 10:02 AM
- Assigned user set to Andrew White
- State changed from new to needs-more-info
- Importance changed from to Low
Routing has completely changed in 3.0, so the patch is out of date. You can specify any HTTP method using the :via option to a route. Does this provide the functionality that you need?
-
Repository November 2nd, 2010 @ 11:09 AM
- State changed from needs-more-info 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
Attachments
Referenced by
- 5895 Allow mounting of rack apps that deal with HTTP extensions Related ticket: https://rails.lighthouseapp.com/projects...
- 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...