Mehboob Alam created WFLY-3279:
----------------------------------
Summary: HttpServletResponse.sendRedirect() not working for relative URL
Key: WFLY-3279
URL:
https://issues.jboss.org/browse/WFLY-3279
Project: WildFly
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Web (Undertow)
Affects Versions: 8.1.0.CR1, 8.0.0.Final
Environment: Windows
Reporter: Mehboob Alam
Assignee: Stuart Douglas
Attachments: Recreate_SendRedirect_Problem.ear
I cannot get HttpServletResponse.sendRedirect() to work correctly. This only happens to me
with Wildfly. It works on previous versions of JBoss EAP/AS and several other app servers
where I tested the scenario.
The sample app has two servlet. I navigate from one to the other using sendRedirect. The
key seems to be relative path in the form "../whatever/whatever" is not
working.
To test this, I enter my app's URL like this-
http://localhost:8080/helloworld/hello
Then, inside the first servlet, I do a redirect -
String url = "../goodbye/bye";
response.sendRedirect(response.encodeRedirectURL(url));
wildfly 8 gives me a HTTP Status 404. wildfly 8.1 CR1 gives me a HTTP Status 403. All
other app server works. It takes me to this url:
http://localhost:8080/goodbye/bye
JBoss eap-6-1-0
Status Host Path
302 localhost:8080 /helloworld/hello
200 localhost:8080 /goodbye/bye/
WildFly 8.0 Final
Status Host Path
302 localhost:8080 /helloworld/hello
404 localhost:8080 /helloworld/
WildFly 8.1.0 CR1 Final
Status Host Path
302 localhost:8080 /helloworld/hello
403 localhost:8080 /helloworld/
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira