[2.7.x] Let user overwrite limit memory size on form binding #10543
Conversation
(cherry picked from commit 5c031b6)
@@ -738,11 +744,12 @@ trait PlayBodyParsers extends BodyParserUtils { | |||
): BodyParser[A] = | |||
BodyParser { requestHeader => | |||
import play.core.Execution.Implicits.trampoline | |||
val parser = anyContent(maxLength) | |||
val parser = anyContent(maxLength) | |||
val binding = formBinding(maxLength.getOrElse(DefaultMaxTextLength)) |
ignasi35
Nov 23, 2020
Author
Member
val binding = formBinding(maxLength.getOrElse(DefaultMaxTextLength))
is necessary to honour the maxLenght
provided on this method.
val binding = formBinding(maxLength.getOrElse(DefaultMaxTextLength))
is necessary to honour the maxLenght
provided on this method.
LGTM Left some minor suggestions on migration page. |
documentation/manual/releases/release27/migration27/Migration27.md
Outdated
Show resolved
Hide resolved
documentation/manual/releases/release27/migration27/Migration27.md
Outdated
Show resolved
Hide resolved
documentation/manual/releases/release27/migration27/Migration27.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Renato Cavalcanti <[email protected]>
8bba039
to
ece858a
I didn't follow this pull request, but is this something that should be forward ported to master/2.8.x? |
yes, we will forward port it. |
I fixed some typos which sneaked into this pull request: #10547 |
Co-authored-by: Renato Cavalcanti <[email protected]> Co-authored-by: Will Sargent <[email protected]>
Co-authored-by: Renato Cavalcanti <[email protected]> Co-authored-by: Will Sargent <[email protected]> (cherry picked from commit cebb701) # Conflicts: # project/BuildSettings.scala
Improves #10496 to avoiding using a hardcoded memory limit when binding a request to a form.
Supersedes #10534 and #10539
This PR puts together ideas and code previously pushed to #10534 and #10539 with some extra feedback from offline discussions.