incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From enor...@apache.org
Subject svn commit: r958417 - /sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ImportOperation.java
Date Sun, 27 Jun 2010 20:27:55 GMT
Author: enorman
Date: Sun Jun 27 20:27:55 2010
New Revision: 958417

URL: http://svn.apache.org/viewvc?rev=958417&view=rev
Log:
SLING-1172 fixed response code for missing required request parameters

Modified:
    sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ImportOperation.java

Modified: sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ImportOperation.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ImportOperation.java?rev=958417&r1=958416&r2=958417&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ImportOperation.java
(original)
+++ sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ImportOperation.java
Sun Jun 27 20:27:55 2010
@@ -95,7 +95,7 @@ public class ImportOperation extends Abs
 
         String contentType = request.getParameter(SlingPostConstants.RP_CONTENT_TYPE);
         if (contentType == null) {
-            response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
+            response.setStatus(HttpServletResponse.SC_PRECONDITION_FAILED,
             "Required :contentType parameter is missing");
             return;
         }
@@ -126,7 +126,7 @@ public class ImportOperation extends Abs
             }
 
             if (contentStream == null) {
-                response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
+                response.setStatus(HttpServletResponse.SC_PRECONDITION_FAILED,
                         "Missing content for import");
                 return;
             } else {



Mime
View raw message