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 2013/05/27 10:36:20 UTC
[jira] [Resolved] (WICKET-5203) Base url is incorrect for error
dispatched pages
[ https://issues.apache.org/jira/browse/WICKET-5203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-5203.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.5.11
7.0.0
6.9.0
> Base url is incorrect for error dispatched pages
> ------------------------------------------------
>
> Key: WICKET-5203
> URL: https://issues.apache.org/jira/browse/WICKET-5203
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.8.0
> Reporter: Martin Grigorov
> Assignee: Martin Grigorov
> Fix For: 6.9.0, 7.0.0, 1.5.11
>
> Attachments: quickstart.tgz
>
>
> The fix for https://issues.apache.org/jira/browse/WICKET-4387 includes the following code in org.apache.wicket.protocol.http.servlet.ServletWebRequest#ServletWebRequest(HttpServletRequest httpServletRequest, String filterPrefix, Url url):
> if (forwardAttributes != null || errorAttributes != null)
> {
> if (LOG.isDebugEnabled())
> {
> LOG.debug("Setting filterPrefix('{}') to '' because there is either an error or a forward. {}, {}",
> new Object[] {filterPrefix, forwardAttributes, errorAttributes});
> }
> // the filter prefix is not needed when the current request is internal
> // see WICKET-4387
> this.filterPrefix = "";
> The filterPrefix is actually needed later when a request is made due to an error (e.g. 404):
> public Url getClientUrl()
> {
> if (errorAttributes != null && !Strings.isEmpty(errorAttributes.getRequestUri()))
> {
> String problematicURI = Url.parse(errorAttributes.getRequestUri(), getCharset())
> .toString();
> return getContextRelativeUrl(problematicURI, filterPrefix);
> With filterPrefix=="" the urls for any resources in the error page are wrong.
--
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