2
I have two applications that worked perfectly, however, without changes in the code, no longer work.
On one side, an application with a JSP making a call POST and passing two parameters Hidden:
<li>
<form name="login" method="post" action="http://dominio.com/aplicacao/chamadaApp">
<input type="hidden" name="param1" value="conteudo1">
<input type="hidden" name="param2" value="conteudo2">
<A href="javascript:login()" class="classe1"></A>
<script type="text/javascript">
function login()
{
document.login.submit();
}
</script>
</form>
</li>
On the other hand, another Springmvc application with the following code snippet, receiving the above request:
@RequestMapping(value = "/chamadaApp", method = RequestMethod.POST)
public ModelAndView login(
@RequestParam(value = "param1", required = false) String param1,
@RequestParam(value = "param2", required = false) String param2,
WebRequest request) {
//código
}
It worked perfectly, however, overnight, the Springmvc application started to return the error HTTP Status 405 - Request method 'GET' not supported. This makes no sense, as both HTML performs a call POST how much the application also expects to receive a call POST.
Investigating a little more, I discovered with FIREBUG that when performing the calling App, before showing the above error, the status is returned: 301 Moved Permanently, which made me suspect some problem below, but I have no idea what it might be.
Does anyone know what that mistake means and how to fix it?
Problem solved: The call to the Springmvc application was made at http (unsafe) and the server redirected to https (secure) automatically. In this redirect, it returned 301 status. By guidance of the infra support, I changed the call to be performed directly to https and started to work. It worked, but unfortunately the doubt remains and maybe it’s what you suspected: some problem in the reverse proxy, but I have no way to confirm that this is really it.
– dellasavia
@dellasavia I’m glad you solved it, but there’s really no way to know exactly what happened. Probably put a new redirection rule on the down-low, only hardly the staff will admit.
– utluiz