This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new c91afd5bd5d CAMEL-17944: camel-platform-http-vertx - Should disable
file uploads by default
c91afd5bd5d is described below
commit c91afd5bd5dde77af5504052bcaa2fbc481d00a2
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Apr 12 10:58:44 2022 +0200
CAMEL-17944: camel-platform-http-vertx - Should disable file uploads by
default
---
.../platform/http/vertx/VertxPlatformHttpServerConfiguration.java | 2 +-
.../component/platform/http/vertx/VertxPlatformHttpEngineTest.java | 2 ++
docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_17.adoc | 4 ++++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git
a/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpServerConfiguration.java
b/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpServerConfiguration.java
index 9bb480650d5..ef89c92d360 100644
---
a/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpServerConfiguration.java
+++
b/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpServerConfiguration.java
@@ -179,7 +179,7 @@ public class VertxPlatformHttpServerConfiguration {
}
public static class BodyHandler {
- private boolean handleFileUploads = true;
+ private boolean handleFileUploads;
private String uploadsDirectory = "file-uploads";
private boolean mergeFormAttributes = true;
private boolean deleteUploadedFilesOnEnd;
diff --git
a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineTest.java
b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineTest.java
index 66ad222f26c..ca2cd0bc330 100644
---
a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineTest.java
+++
b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineTest.java
@@ -364,6 +364,8 @@ public class VertxPlatformHttpEngineTest {
final CamelContext context = createCamelContext(configuration -> {
VertxPlatformHttpServerConfiguration.BodyHandler bodyHandler
= new VertxPlatformHttpServerConfiguration.BodyHandler();
+ // turn on file uploads
+ bodyHandler.setHandleFileUploads(true);
bodyHandler.setUploadsDirectory(tempFile.getParent());
configuration.setBodyHandler(bodyHandler);
});
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_17.adoc
b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_17.adoc
index 6fa76211adb..714f8939428 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_17.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_17.adoc
@@ -96,4 +96,8 @@ Asynchronous, Synchronous or NO-OP commit policies from the
former `autoCommitOn
* Async can be set using
`kafkaManualCommitFactory=#class:org.apache.camel.component.kafka.consumer.DefaultKafkaManualAsyncCommitFactory`
* Sync can be set using
`kafkaManualCommitFactory=#class:org.apache.camel.component.kafka.consumer.DefaultKafkaManualCommitFactory`
+=== camel-platform-http-vertx
+
+The configuration for body handler file uploads has changed from `true` to
`false`.
+The configuration can be enabled via the
`VertxPlatformHttpServerConfiguration` class.