akka/akka-http

Akka HTTP configuration details exposed to client on EntityStreamSizeException

オープン

#1,015 opened on 2017/04/06

 (7 件のコメント) (0 件のリアクション) (1 人の担当者)Scala (598 件のフォーク)batch import
3 - in progressbughelp wantedt:core

Repository metrics

Stars
 (1,311 個のスター)
PR merge metrics
 (平均マージ 1d 10h) (30d で 2 merged PRs)

説明

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.

コントリビューターガイド