Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Allow mounting of rack apps that deal with HTTP extensions

#5895

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: #2809 [PATCH] Allowed controlled addition of new http methods

Reported by clyfe · October 30th, 2010 @ 04:17 PM

State: resolved
Milestone: 3.0.2
Assigned to: Andrew White Andrew White
Importance: Low

Activity

  1. Andrew White
    Andrew White
    • 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
    

    November 1st, 2010 @ 04:08 PM

  2. Repository
    Repository
    • State changed from open to resolved

    (from [6c8982fa137421eebdc55560d5ebd52703b65c65]) Add additional HTTP request methods from the following RFCs:

    [#2809 [PATCH] Allowed controlled addition of new http methods state:resolved] [#5895 Allow mounting of rack apps that deal with HTTP extensions state:resolved] http://github.com/rails/rails/commit/6c8982fa137421eebdc55560d5ebd5...

    November 2nd, 2010 @ 11:09 AM

  3. Repository
    Repository

    (from [d446392f76c063d9f04396a1d3ca9e314a521671]) Add additional HTTP request methods from the following RFCs:

    [#2809 [PATCH] Allowed controlled addition of new http methods state:resolved] [#5895 Allow mounting of rack apps that deal with HTTP extensions state:resolved] http://github.com/rails/rails/commit/d446392f76c063d9f04396a1d3ca9e...

    November 2nd, 2010 @ 11:09 AM