cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r591204 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractCXFServlet.java rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
Date Fri, 02 Nov 2007 03:06:20 GMT
Author: dkulp
Date: Thu Nov  1 20:06:20 2007
New Revision: 591204

URL: http://svn.apache.org/viewvc?rev=591204&view=rev
Log:
Merged revisions 591096 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/cxf/trunk

........
  r591096 | dkulp | 2007-11-01 13:31:35 -0400 (Thu, 01 Nov 2007) | 2 lines
  
  [CXF-1158] Ability to turn off rewritting of addresses in servlet
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractCXFServlet.java
    incubator/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java

Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: incubator/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractCXFServlet.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractCXFServlet.java?rev=591204&r1=591203&r2=591204&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractCXFServlet.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractCXFServlet.java
Thu Nov  1 20:06:20 2007
@@ -56,7 +56,15 @@
         ServletController newController = new ServletController(servletTransportFactory,
this);
         if (hideServiceList != null) {
             newController.setHideServiceList(Boolean.valueOf(hideServiceList));
-        }    
+        }
+        String disableAddressUpdates = servletConfig.getInitParameter("disable-address-updates");
+        if (disableAddressUpdates != null) {
+            newController.setDisableAddressUpdates(Boolean.valueOf(disableAddressUpdates));
+        }
+        String forcedBaseAddress = servletConfig.getInitParameter("base-address");
+        if (forcedBaseAddress != null) {
+            newController.setForcedBaseAddress(forcedBaseAddress);
+        }
         return newController;
     }
     

Modified: incubator/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java?rev=591204&r1=591203&r2=591204&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
Thu Nov  1 20:06:20 2007
@@ -55,6 +55,8 @@
     private AbstractCXFServlet cxfServlet;
     private String lastBase = "";
     private boolean isHideServiceList;
+    private boolean disableAddressUpdates;
+    private String forcedBaseAddress;
  
     public ServletController(ServletTransportFactory df, AbstractCXFServlet servlet) {
         this.transport = df;
@@ -64,9 +66,18 @@
     public void setHideServiceList(boolean generate) {
         isHideServiceList = generate;
     }
+    public void setDisableAddressUpdates(boolean noupdates) {
+        disableAddressUpdates = noupdates;
+    }
+    public void setForcedBaseAddress(String s) {
+        forcedBaseAddress = s;
+    }
     
     private synchronized void updateDests(HttpServletRequest request) {
-        String base = getBaseURL(request);
+        if (disableAddressUpdates) {
+            return;
+        }
+        String base = forcedBaseAddress == null ? getBaseURL(request) : forcedBaseAddress;
                 
         if (base.equals(lastBase)) {
             return;



Mime
View raw message