| Summary: | POST-Request becomes GET-Request | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Mahe <marcel.heckel> |
| Component: | server | Assignee: | Greg Wilkins <gregw> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | jetty-inbox, micfra |
| Version: | unspecified | ||
| Target Milestone: | 7.1.x | ||
| Hardware: | PC | ||
| OS: | Windows Vista | ||
| Whiteboard: | |||
|
Description
Mahe
The issue here is that jetty is doing a redirect from /test to /test/, and a redirected POST will end up as a GET. The reason for the redirect is that the servlet spec treats the root of a context like a directory and there is no valid set of contextPath + servletPath + pathInfo that is legal for a URL of /test to a context /test More importantly, if you send back HTML from a request to /test then any relative links will be relative to / instead of /test. Thus the redirect to /test/ fixes this. If you add a / to the URL in your post, you should be good. Maybe the following was not possible back in 2010-12, but nowadays, you can add context.setAllowNullPathInfo(true) to avoid silent redirect from /context to /context/. |