You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2025/03/13 19:30:51 UTC
(httpcomponents-client) branch master updated: Updated MultipartEntityBuilder javadocs clarifying content validation and sanitization as a responsibility of the caller
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git
The following commit(s) were added to refs/heads/master by this push:
new 9b03e6e30 Updated MultipartEntityBuilder javadocs clarifying content validation and sanitization as a responsibility of the caller
9b03e6e30 is described below
commit 9b03e6e3021e867ea4c5cdb30b08b1a4ad0f6a3a
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Thu Mar 13 20:30:14 2025 +0100
Updated MultipartEntityBuilder javadocs clarifying content validation and sanitization as a responsibility of the caller
---
.../apache/hc/client5/http/entity/mime/MultipartEntityBuilder.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/MultipartEntityBuilder.java b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/MultipartEntityBuilder.java
index 805267c8c..e3bce018c 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/MultipartEntityBuilder.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/MultipartEntityBuilder.java
@@ -55,6 +55,11 @@
* is logged when no explicit boundary is set via {@link #setBoundary(String)}, encouraging
* deliberate choice.
* </p>
+ * <p>
+ * IMPORTANT: it is responsibility of the caller to validate / sanitize content of body
+ * parts, for instance, to ensure they do not contain the boundary value that can prevent
+ * the consumer of the entity from correctly parsing / processing the body parts.
+ * </p>
*
* @since 5.0
*/