akka/akka-http

Akka HTTP configuration details exposed to client on EntityStreamSizeException

Open

#1,015 建立於 2017年4月6日

在 GitHub 查看
 (7 留言) (0 反應) (1 負責人)Scala (1,311 star) (598 fork)batch import
3 - in progressbughelp wantedt:core

描述

Hi,

The current implementation of the EntityStreamSizeException handling exposes a detailed message about which Akka settings to use (to allow bigger contents in requests) to the client, even though verbose-error-messages is set to off.

I changed the Class to extend ExceptionWithErrorInfo to distinguish between a summary and a detailed message. There is a check for the verbosity setting in HttpServerBluePrint:459 but it seems like it is never called and the ErrorInfo.formatPretty result is returned to the client (which may also just be the result of RuntimeException.getMessage as ExceptionWithErrorInfo extends RuntimeException).

Do you have an idea why or what to change to only display the summary in that case? The mentioned classes are in the akka-http-core module.

You can trigger it by setting akka.http.server.parsing.max-content-length to 1 and send some data with your request.

I pushed my current changes to https://github.com/makubi/akka-http/commit/546af4fa4ac4c5c7e78df2c8b3ba083aa64b3c2e.

Thanks in advance.

貢獻者指南

Akka HTTP configuration details exposed to client on EntityStreamSizeException · akka/akka-http#1015 | Good First Issue