You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2010/09/29 14:50:34 UTC
[jira] Reopened: (WICKET-2282) StringIndexOutOfBoundsException when
using FormTester.submit() with form that redirects to "/" onSubmit()
[ https://issues.apache.org/jira/browse/WICKET-2282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov reopened WICKET-2282:
-------------------------------------
Assignee: (was: Igor Vaynberg)
Re-opening the issue.
The attached quickstart reproduces it.
> StringIndexOutOfBoundsException when using FormTester.submit() with form that redirects to "/" onSubmit()
> ---------------------------------------------------------------------------------------------------------
>
> Key: WICKET-2282
> URL: https://issues.apache.org/jira/browse/WICKET-2282
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4-RC1, 1.4-RC2, 1.4-RC3, 1.4-RC4
> Reporter: Brad Fritz
> Priority: Minor
> Attachments: external-redirect-during-form-submit.zip
>
>
> When testing a form that redirects to "/" in onSubmit() with FormTester, the test fails with:
> INFO - MockHttpServletRequest - Redirecting to /WicketApplication/
> ERROR - RequestCycle - String index out of range: -17
> java.lang.StringIndexOutOfBoundsException: String index out of range: -17
> at java.lang.String.substring(String.java:1768)
> at java.lang.String.substring(String.java:1735)
> at org.apache.wicket.protocol.http.WicketFilter.getRelativePath(WicketFilter.java:575)
> at org.apache.wicket.protocol.http.servlet.ServletWebRequest.getPath(ServletWebRequest.java:170)
> at org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.getRequestPath(WebRequestCodingStrategy.java:1042)
> at org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:202)
> at org.apache.wicket.Request.getRequestParameters(Request.java:172)
> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1300)
> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)
> at org.apache.wicket.RequestCycle.request(RequestCycle.java:544)
> at org.apache.wicket.protocol.http.MockWebApplication.postProcessRequestCycle(MockWebApplication.java:545)
> at org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:517)
> at org.apache.wicket.util.tester.FormTester.submit(FormTester.java:661)
> at quickstart.TestHomePage.testRenderMyPage(TestHomePage.java:26)
> [..]
> This bug is similar to WICKET-1864 and *might* have been a regression during the
> fix for WICKET-702.
> Quickstart project to reproduce the problem attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.