Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jruby-rack-1.1.x can not handle PUT/DELETE request #109

Closed
mkristian opened this issue Jun 19, 2012 · 5 comments
Closed

jruby-rack-1.1.x can not handle PUT/DELETE request #109

mkristian opened this issue Jun 19, 2012 · 5 comments

Comments

@mkristian
Copy link
Member

with jruby-rack I get
HTTP/1.1 405 HTTP method PUT is not supported by this URL
when I sent a PUT request to the server. same for DELETE. see my gist how to reproduce it

https://gist.github.com/2952760

@kares
Copy link
Member

kares commented Jun 19, 2012

reminds me of #105 and that one has been fixed in 1.1.6 good you make sure you're using that version ?!

if it still does not work and since you seem to be the jetty-run owner maybe you could tell us how jruby-rack is setup (filter/servlet) so we do not have to digg down the source ...

@mkristian
Copy link
Member Author

with 1.1.6 it does not work with 1.0.10 everything works. did not try any immediate versions. I added the web.xml I am using to https://gist.github.com/2952760

jetty-run just starts jetty with that webapp +web.xml inside the rails directory. POST and GET do work. if you need a context.xml for a standalone jetty, I should be able to provide it (do what the jetty-maven-plugin in does manually). jetty version is 7.6.4.v20120524 - did not try higher versions.

@mkristian
Copy link
Member Author

I tried all different versions - so version 1.1.1, 1.1.4 and 1.0.10 are working. 1.1.3 does reach rails but has a stream problem. version 1.1.5 and 1.1.6 do show the reported problem.

same behaviour with jetty 8.1.4.v20120524

@kares
Copy link
Member

kares commented Jun 20, 2012

I see, it's caused by a refactoring we did in how the filter handles it's up chain, previously it "swallowed" all error outcomes.
Now it checks for a specific error 404 (and due Tomcat 403 since it's the reference impl and returns it on PUT/DELETEs) otherwise assumes the request is handled by the chain and does return the response (without dispatching to Rails).

There are 2 ways you can work-around this on 1.1.6:

  1. do not use the RackFilter if you do not need it's behavior - use the RackServlet instead
  2. you might configure the "unhandled" responses with a filter init-paramater responseNotHandledStatuses

As a resolution of this issue I'll most likely add HTTP 405 to the default responses list as well ...

@kares kares closed this as completed in ce6975f Jun 20, 2012
@mkristian
Copy link
Member Author

thanx for adding 405 - it will keep jetty on the same level of support as tomcat :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants