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 subversion and git services (Jira)" <ji...@apache.org> on 2023/08/17 16:59:00 UTC

[jira] [Commented] (WICKET-7067) DefaultExceptionMapper should not set disableCaching for WebSocketResponse

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

ASF subversion and git services commented on WICKET-7067:
---------------------------------------------------------

Commit 3cf61281ee197fa1a76ee9ded7dd16ad5394e6fd in wicket's branch refs/heads/reiern70/WICKET-7067 from reiern70
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=3cf61281ee ]

[WICKET-7067] WebSocketResponse does not allow setting a header thus, disableCaching fails with an UnsupportedOperationException


> DefaultExceptionMapper should not set disableCaching for  WebSocketResponse
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-7067
>                 URL: https://issues.apache.org/jira/browse/WICKET-7067
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 10.0.0-M1, 9.14.0
>            Reporter: Ernesto Reinaldo Barreiro
>            Assignee: Ernesto Reinaldo Barreiro
>            Priority: Major
>             Fix For: 9.15.0, 10.0.0-M2
>
>
> @Override
> public IRequestHandler map(Exception e)
> {
> try
> {
> Response response = RequestCycle.get().getResponse();
> if (response instanceof WebResponse)
> {
> // we don't want to cache an exceptional reply in the browser
> ((WebResponse)response).disableCaching();
> }
> return internalMap(e);
> }
> catch (RuntimeException e2)
> {
> return handleNestedException(e, e2);
> }
> }



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