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 20:23:38 UTC

(httpcomponents-client) branch 5.4.x 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 5.4.x
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git


The following commit(s) were added to refs/heads/5.4.x by this push:
     new 98e8e9da6 Updated MultipartEntityBuilder javadocs clarifying content validation and sanitization as a responsibility of the caller
98e8e9da6 is described below

commit 98e8e9da655fbf338652b16f77160e5608fbb903
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 d9574361b..613bc41c1 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
@@ -45,6 +45,11 @@
 
 /**
  * Builder for multipart {@link HttpEntity}s.
+ * <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
  */