summaryrefslogtreecommitdiffhomepage
path: root/src/java/nginx/unit/ForwardRequestWrapper.java
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2019-08-14 15:24:41 +0300
committerMax Romanov <max.romanov@nginx.com>2019-08-14 15:24:41 +0300
commit4bef4256c05c3f905e3d65e40585bba5ce0f3327 (patch)
treec5b8b67273cc639e3ac0cd062a65865e6a5cc61a /src/java/nginx/unit/ForwardRequestWrapper.java
parent8904c87c6beb4f2b080bf4269fb211e6f2eea7f2 (diff)
downloadunit-4bef4256c05c3f905e3d65e40585bba5ce0f3327.tar.gz
unit-4bef4256c05c3f905e3d65e40585bba5ce0f3327.tar.bz2
Java: implementing multipart message support.
This closes #265 issue on GitHub.
Diffstat (limited to 'src/java/nginx/unit/ForwardRequestWrapper.java')
-rw-r--r--src/java/nginx/unit/ForwardRequestWrapper.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/java/nginx/unit/ForwardRequestWrapper.java b/src/java/nginx/unit/ForwardRequestWrapper.java
index f88b6aef..fe8adf8a 100644
--- a/src/java/nginx/unit/ForwardRequestWrapper.java
+++ b/src/java/nginx/unit/ForwardRequestWrapper.java
@@ -4,6 +4,7 @@ import java.util.List;
import java.util.Map;
import javax.servlet.DispatcherType;
+import javax.servlet.MultipartConfigElement;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
@@ -24,6 +25,8 @@ public class ForwardRequestWrapper implements DynamicPathRequest
private final String orig_context_path;
private final String orig_query;
+ private final MultipartConfigElement orig_multipart_config;
+
private final DispatcherType orig_dtype;
private MultiMap<String> orig_parameters;
@@ -46,6 +49,8 @@ public class ForwardRequestWrapper implements DynamicPathRequest
orig_uri = request_.getRequestURI();
orig_context_path = request_.getContextPath();
orig_query = request_.getQueryString();
+
+ orig_multipart_config = request_.getMultipartConfig();
}
@Override
@@ -125,6 +130,11 @@ public class ForwardRequestWrapper implements DynamicPathRequest
return request_.getFilterPath();
}
+ public void setMultipartConfig(MultipartConfigElement mce)
+ {
+ request_.setMultipartConfig(mce);
+ }
+
public void close()
{
request_.setDispatcherType(orig_dtype);
@@ -137,6 +147,8 @@ public class ForwardRequestWrapper implements DynamicPathRequest
request_.setParameters(orig_parameters);
}
+ request_.setMultipartConfig(orig_multipart_config);
+
if (keep_attrs) {
return;
}