You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/11/28 13:45:00 UTC

[jira] [Commented] (WICKET-7074) [AJAX] malformed XML is produced if an error is produced during AJAX rendering and a redirect is issued

    [ https://issues.apache.org/jira/browse/WICKET-7074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17790575#comment-17790575 ] 

ASF GitHub Bot commented on WICKET-7074:
----------------------------------------

martin-g commented on PR #658:
URL: https://github.com/apache/wicket/pull/658#issuecomment-1829875635

   @reiern70 This could be closed now, right ?




> [AJAX] malformed XML is produced if an error is produced during AJAX rendering and a redirect is issued 
> --------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-7074
>                 URL: https://issues.apache.org/jira/browse/WICKET-7074
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 10.0.0-M1, 9.15.0
>            Reporter: Ernesto Reinaldo Barreiro
>            Assignee: Ernesto Reinaldo Barreiro
>            Priority: Major
>             Fix For: 10.0.0-M2, 9.16.0
>
>
> In AjaxRequestHandler in case there are no filters defined AjaxUpdate written directly to response. See below
>  
>  
> {code:java}
> // code placeholder
> if (filters == null || filters.isEmpty())
> {
>     update.writeTo(response, encoding);
> }
> else
> {
>     final StringResponse bodyResponse = new StringResponse();
>     update.writeTo(bodyResponse, encoding);
>     CharSequence filteredResponse = invokeResponseFilters(bodyResponse, filters);
>     response.write(filteredResponse);
> } {code}
>  
> In case a "dynamic" error is produced and we use exception mapper to redirect to an error page then generated response XML is of the form
>  
> {code:java}
> // code placeholder
> <?xml version="1.0" encoding="UTF-8"?><ajax-response><ajax-response><redirect><![CDATA[./internalError?4]]></redirect></ajax-response>{code}
> which is malfomed and this causes redirect to be broken. 
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)