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/10/31 16:57:00 UTC

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

Rémi Kowalski created JAMES-2956:
------------------------------------

             Summary: 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


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