You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Benoit Tellier (Jira)" <se...@james.apache.org> on 2019/11/06 06:24:00 UTC

[jira] [Commented] (JAMES-2956) Webadmin : a malformed url in the request, produce a 400 bad request response with an html body instead of a json one

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

Benoit Tellier commented on JAMES-2956:
---------------------------------------

https://github.com/linagora/james-project/pull/2812 is merged

> Webadmin : a malformed url  in the request, produce a 400 bad request response with an html body instead of a json one
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: JAMES-2956
>                 URL: https://issues.apache.org/jira/browse/JAMES-2956
>             Project: James Server
>          Issue Type: Bug
>            Reporter: RĂ©mi Kowalski
>            Priority: Major
>
> When a malformed url is received by the webadmin server.
>  A 400 BadRequest is sent with an html body.
>  We would have preferred to have a JSON response with the same structure of all the error messages in the webadmin.
> Unfortunately the fix to this will not be trivial. Because Spark has no way to be notified from this. It's deep into Jetty code with no way to override this behavior.
> See : {{HttpConnection.onFillable}}, the boolean {{handle}} is set to {{false}} after a call to {{parseRequestBuffer()}}.
>  So the {{Channel.handle}} method is never call, neither the filters from Spark.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org