cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r588803 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartFilter.java
Date Fri, 26 Oct 2007 23:40:15 GMT
Author: vgritsenko
Date: Fri Oct 26 16:40:14 2007
New Revision: 588803

URL: http://svn.apache.org/viewvc?rev=588803&view=rev
Log:
multipart filter must not interfere with exeption handling
(or its absence)

Modified:
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartFilter.java

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartFilter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartFilter.java?rev=588803&r1=588802&r2=588803&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartFilter.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/MultipartFilter.java
Fri Oct 26 16:40:14 2007
@@ -114,17 +114,22 @@
         HttpServletRequest request = (HttpServletRequest) req;
         HttpServletResponse response = (HttpServletResponse) res;
         try{
-            request = this.requestFactory.getServletRequest(request);
-            filterChain.doFilter(request, response);
-        } catch (Exception e) {
-            if (getLogger().isErrorEnabled()) {
-                getLogger().error("Problem in multipart filter. Unable to create request.",
e);
+
+            try {
+                request = this.requestFactory.getServletRequest(request);
+            } catch (Exception e) {
+                if (getLogger().isErrorEnabled()) {
+                    getLogger().error("Problem in multipart filter. Unable to create request.",
e);
+                }
+
+                RequestUtil.manageException(request, response, null, null,
+                                            HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
+                                            "Problem in creating the Request",
+                                            null, null, e, this.servletSettings, getLogger(),
this);
             }
 
-            RequestUtil.manageException(request, response, null, null,
-                                        HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
-                                        "Problem in creating the Request",
-                                        null, null, e, this.servletSettings, getLogger(),
this);
+            filterChain.doFilter(request, response);
+
         } finally {
             try {
                 if (request instanceof MultipartHttpServletRequest) {



Mime
View raw message