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 "Rémi Kowalski (Jira)" <se...@james.apache.org> on 2019/11/06 08:10:00 UTC

[jira] [Closed] (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:all-tabpanel ]

Rémi Kowalski closed JAMES-2956.
--------------------------------
    Resolution: Won't Fix

The problem being in a not overridable behavior of the underlying Jetty used by Spark, it will not be fixed at the moment.


The PR [https://github.com/linagora/james-project/pull/2812]

add a test to demonstrate the behavior.

> 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