-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Rust Server] Allow configuration of multipart/form attachment size l…
…imit (#19371) * [Rust Server] Allow configuration of multipart/form attachment size limit multipart 0.14+ imposes a 8MB size limit on multipart/form bodies. This allows that limit to be configured. The default is left as is. This also improves error messages produced when handling multipart/form bodies. * Update samples
- Loading branch information
1 parent
bb831da
commit 0a5c997
Showing
13 changed files
with
440 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 12 additions & 4 deletions
16
modules/openapi-generator/src/main/resources/rust-server/server-service-footer.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
_ => Ok(Response::builder().status(StatusCode::NOT_FOUND) | ||
.body(Body::empty()) | ||
.expect("Unable to create Not Found response")) | ||
_ => Ok(Response::builder().status(StatusCode::NOT_FOUND) | ||
.body(Body::empty()) | ||
.expect("Unable to create Not Found response")) | ||
} | ||
} | ||
} Box::pin(run(self.api_impl.clone(), req)) } | ||
Box::pin(run( | ||
self.api_impl.clone(), | ||
req, | ||
{{#apiUsesMultipartFormData}} | ||
self.multipart_form_size_limit, | ||
{{/apiUsesMultipartFormData}} | ||
)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.