You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2021/12/09 12:23:22 UTC

[felix-dev] branch master updated: FELIX-6482 : Root directory used if location for multipart is set to empty string

This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git


The following commit(s) were added to refs/heads/master by this push:
     new 3bac62e  FELIX-6482 : Root directory used if location for multipart is set to empty string
3bac62e is described below

commit 3bac62e1ca40073650efc33e557832c0d47ea55a
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Dec 9 13:23:12 2021 +0100

    FELIX-6482 : Root directory used if location for multipart is set to empty string
---
 .../org/apache/felix/http/base/internal/handler/ServletHandler.java    | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandler.java b/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandler.java
index 8d66351..9a3f2b3 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandler.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandler.java
@@ -64,6 +64,9 @@ public abstract class ServletHandler implements Comparable<ServletHandler>
         if ( origConfig != null )
         {
             String location = origConfig.multipartLocation;
+            if ( location != null && location.trim().length() == 0 ) {
+                location = null;
+            }
             if ( location == null ) {
                 final Object obj = context == null ? null : context.getAttribute(JAVA_SERVLET_TEMP_DIR_PROP);
                 if ( obj != null ) {