Skip to content

Commit

Permalink
KTOR-7946 Fix FormFieldLimit overwritten by default arg (#4541)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjhham authored Dec 16, 2024
1 parent b1e1bd9 commit 2229b2b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,11 @@ public var ApplicationCall.formFieldLimit: Long
* @throws ContentTransformationException when content cannot be transformed to the [MultiPartData].
*/
public suspend inline fun ApplicationCall.receiveMultipart(
formFieldLimit: Long = DEFAULT_FORM_FIELD_MAX_SIZE
formFieldLimit: Long = -1L
): MultiPartData {
this.formFieldLimit = formFieldLimit
if (formFieldLimit > 0) {
this.formFieldLimit = formFieldLimit
}
return receive()
}

Expand Down

0 comments on commit 2229b2b

Please sign in to comment.