Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurz committed Jan 23, 2020
1 parent eaf487e commit 5806e99
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions core/play/src/main/scala/play/api/mvc/Action.scala
Original file line number Diff line number Diff line change
Expand Up @@ -226,19 +226,17 @@ object BodyParser {
): Future[Result] = {
request.attrs
.get(RequestAttrKey.DeferredBodyParserInvoker)
.map(
invokeAction => {
logger.trace("Body parsing was deferred, eventually parsing now for request: " + request)
invokeAction(
// First runs the parser, then invokes the given "next" action
// (We remove the request attribute in case calling this method multiple times it won't parse again)
Future(
runParserThenInvokeAction(parser, request.removeAttr(RequestAttrKey.DeferredBodyParserInvoker), next)
),
false
)
}
)
.map(invokeAction => {
logger.trace("Body parsing was deferred, eventually parsing now for request: " + request)
invokeAction(
// First runs the parser, then invokes the given "next" action
// (We remove the request attribute in case calling this method multiple times it won't parse again)
Future(
runParserThenInvokeAction(parser, request.removeAttr(RequestAttrKey.DeferredBodyParserInvoker), next)
),
false
)
})
.getOrElse({
logger.trace("Not parsing body, was parsed before already for request: " + request)
next(request)
Expand Down

0 comments on commit 5806e99

Please sign in to comment.