=htc #18489 allow infinite value in max-content-length
This commit is contained in:
parent
090bad9d24
commit
154bd23b85
3 changed files with 11 additions and 4 deletions
|
|
@ -196,10 +196,17 @@ akka.http {
|
|||
max-header-name-length = 64
|
||||
max-header-value-length = 8k
|
||||
max-header-count = 64
|
||||
max-content-length = 8m
|
||||
max-chunk-ext-length = 256
|
||||
max-chunk-size = 1m
|
||||
|
||||
# Maximum content length which should not be exceeded by incoming HttpRequests.
|
||||
# For file uploads which use the entityBytes Source of an incoming HttpRequest it is safe to
|
||||
# set this to a very high value (or to `infinite` if feeling very adventurous) as the streaming
|
||||
# upload will be back-pressured properly by Akka Streams.
|
||||
# Please note however that this setting is a global property, and is applied to all incoming requests,
|
||||
# not only file uploads consumed in a streaming fashion, so pick this limit wisely.
|
||||
max-content-length = 8m
|
||||
|
||||
# Sets the strictness mode for parsing request target URIs.
|
||||
# The following values are defined:
|
||||
#
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ object ParserSettings extends SettingsCompanion[ParserSettings]("akka.http.parsi
|
|||
c getIntBytes "max-header-name-length",
|
||||
c getIntBytes "max-header-value-length",
|
||||
c getIntBytes "max-header-count",
|
||||
c getBytes "max-content-length",
|
||||
c getPossiblyInfiniteBytes "max-content-length",
|
||||
c getIntBytes "max-chunk-ext-length",
|
||||
c getIntBytes "max-chunk-size",
|
||||
Uri.ParsingMode(c getString "uri-parsing-mode"),
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ private[http] class EnhancedConfig(val underlying: Config) extends AnyVal {
|
|||
case x ⇒ getIntBytes(path)
|
||||
}
|
||||
|
||||
def getPossiblyInfiniteLongBytes(path: String): Long = underlying.getString(path) match {
|
||||
def getPossiblyInfiniteBytes(path: String): Long = underlying.getString(path) match {
|
||||
case "infinite" ⇒ Long.MaxValue
|
||||
case x ⇒ getIntBytes(path)
|
||||
case x ⇒ underlying.getBytes(path)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue