incubator-wink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From el...@apache.org
Subject svn commit: r789090 - in /incubator/wink/sandbox/wink-server/src/main: java/org/apache/wink/server/internal/DeploymentConfiguration.java resources/META-INF/configuration-default.properties
Date Sun, 28 Jun 2009 11:27:51 GMT
Author: elman
Date: Sun Jun 28 11:27:50 2009
New Revision: 789090

URL: http://svn.apache.org/viewvc?rev=789090&view=rev
Log:
Making Location Header validator configurable.
See https://issues.apache.org/jira/browse/WINK-13

Modified:
    incubator/wink/sandbox/wink-server/src/main/java/org/apache/wink/server/internal/DeploymentConfiguration.java
    incubator/wink/sandbox/wink-server/src/main/resources/META-INF/configuration-default.properties

Modified: incubator/wink/sandbox/wink-server/src/main/java/org/apache/wink/server/internal/DeploymentConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/wink/sandbox/wink-server/src/main/java/org/apache/wink/server/internal/DeploymentConfiguration.java?rev=789090&r1=789089&r2=789090&view=diff
==============================================================================
--- incubator/wink/sandbox/wink-server/src/main/java/org/apache/wink/server/internal/DeploymentConfiguration.java
(original)
+++ incubator/wink/sandbox/wink-server/src/main/java/org/apache/wink/server/internal/DeploymentConfiguration.java
Sun Jun 28 11:27:50 2009
@@ -65,7 +65,6 @@
 import org.apache.wink.server.internal.registry.ResourceRegistry;
 import org.apache.wink.server.internal.registry.ServerInjectableFactory;
 
-
 /**
  * <p>
  * This class implements a default deployment configuration for Symphony. In
@@ -76,9 +75,9 @@
  */
 public class DeploymentConfiguration {
 
-    private static final String   ALTERNATIVE_SHORTCUTS = "META-INF/symphony-alternateShortcutsMap.properties";
-    private static final Log      logger                = LogFactory.getLog(DeploymentConfiguration.class);
-
+    private static final String   ALTERNATIVE_SHORTCUTS    = "META-INF/symphony-alternateShortcutsMap.properties";
+    private static final Log      logger                   = LogFactory.getLog(DeploymentConfiguration.class);
+    private static final String   VALIDATE_LOCATION_HEADER = "wink.validateLocationHeader";
     // handler chains
     private RequestHandlersChain  requestHandlersChain;
     private ResponseHandlersChain responseHandlersChain;
@@ -89,8 +88,8 @@
     private List<ResponseHandler> errorUserHandlers;
 
     // registries
-    private ProvidersRegistry providersRegistry;
-    private ResourceRegistry  resourceRegistry;
+    private ProvidersRegistry     providersRegistry;
+    private ResourceRegistry      resourceRegistry;
     private OFFactoryRegistry     ofFactoryRegistry;
 
     // mappers
@@ -117,7 +116,7 @@
         initMediaTypeMapper();
         initHandlers();
     }
-    
+
     public RequestHandlersChain getRequestHandlersChain() {
         return requestHandlersChain;
     }
@@ -359,7 +358,9 @@
      */
     protected List<ResponseHandler> initResponseUserHandlers() {
         ArrayList<ResponseHandler> list = new ArrayList<ResponseHandler>(1);
-        list.add(new CheckLocationHeaderHandler());
+        if (Boolean.getBoolean(properties.getProperty(VALIDATE_LOCATION_HEADER))) {
+            list.add(new CheckLocationHeaderHandler());
+        }
         return list;
 
     }

Modified: incubator/wink/sandbox/wink-server/src/main/resources/META-INF/configuration-default.properties
URL: http://svn.apache.org/viewvc/incubator/wink/sandbox/wink-server/src/main/resources/META-INF/configuration-default.properties?rev=789090&r1=789089&r2=789090&view=diff
==============================================================================
--- incubator/wink/sandbox/wink-server/src/main/resources/META-INF/configuration-default.properties
(original)
+++ incubator/wink/sandbox/wink-server/src/main/resources/META-INF/configuration-default.properties
Sun Jun 28 11:27:50 2009
@@ -1,3 +1,6 @@
+# Validate Location Header
+wink.validateLocationHeader=false
+
 # Link Builders properties
 symphony.http.uri=
 symphony.https.uri=



Mime
View raw message