diff options
author | Max Romanov <max.romanov@nginx.com> | 2019-08-14 15:24:41 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2019-08-14 15:24:41 +0300 |
commit | 4bef4256c05c3f905e3d65e40585bba5ce0f3327 (patch) | |
tree | c5b8b67273cc639e3ac0cd062a65865e6a5cc61a /src/java/nginx/unit/IncludeRequestWrapper.java | |
parent | 8904c87c6beb4f2b080bf4269fb211e6f2eea7f2 (diff) | |
download | unit-4bef4256c05c3f905e3d65e40585bba5ce0f3327.tar.gz unit-4bef4256c05c3f905e3d65e40585bba5ce0f3327.tar.bz2 |
Java: implementing multipart message support.
This closes #265 issue on GitHub.
Diffstat (limited to '')
-rw-r--r-- | src/java/nginx/unit/IncludeRequestWrapper.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/java/nginx/unit/IncludeRequestWrapper.java b/src/java/nginx/unit/IncludeRequestWrapper.java index 67a51b24..761a0d52 100644 --- a/src/java/nginx/unit/IncludeRequestWrapper.java +++ b/src/java/nginx/unit/IncludeRequestWrapper.java @@ -1,6 +1,7 @@ package nginx.unit; import javax.servlet.DispatcherType; +import javax.servlet.MultipartConfigElement; import javax.servlet.RequestDispatcher; import javax.servlet.ServletRequest; @@ -14,6 +15,8 @@ public class IncludeRequestWrapper implements DynamicPathRequest private final Object orig_context_path_attr; private final Object orig_query_string_attr; + private final MultipartConfigElement orig_multipart_config; + private final DispatcherType orig_dtype; private String filter_path_; @@ -32,6 +35,8 @@ public class IncludeRequestWrapper implements DynamicPathRequest orig_context_path_attr = request_.getAttribute(RequestDispatcher.INCLUDE_CONTEXT_PATH); orig_query_string_attr = request_.getAttribute(RequestDispatcher.INCLUDE_QUERY_STRING); + orig_multipart_config = request_.getMultipartConfig(); + orig_dtype = request_.getDispatcherType(); request_.setAttribute_(RequestDispatcher.INCLUDE_CONTEXT_PATH, request_.getContextPath()); @@ -75,6 +80,11 @@ public class IncludeRequestWrapper implements DynamicPathRequest return filter_path_; } + public void setMultipartConfig(MultipartConfigElement mce) + { + request_.setMultipartConfig(mce); + } + public void close() { request_.setDispatcherType(orig_dtype); @@ -84,5 +94,7 @@ public class IncludeRequestWrapper implements DynamicPathRequest request_.setAttribute_(RequestDispatcher.INCLUDE_REQUEST_URI, orig_uri_attr); request_.setAttribute_(RequestDispatcher.INCLUDE_CONTEXT_PATH, orig_context_path_attr); request_.setAttribute_(RequestDispatcher.INCLUDE_QUERY_STRING, orig_query_string_attr); + + request_.setMultipartConfig(orig_multipart_config); } } |