cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1343125 - in /cxf/branches/2.5.x-fixes: ./ rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/ rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/ rt/transports/http-jetty/src/main/res...
Date Mon, 28 May 2012 02:19:07 GMT
Author: ffang
Date: Mon May 28 02:19:06 2012
New Revision: 1343125

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

........
  r1343116 | ffang | 2012-05-28 07:49:55 +0800 (δΈ€, 28  5 2012) | 1 line
  
  [CXF-4338]config option to allow suppression of server version display in http response
headers
........

Modified:
    cxf/branches/2.5.x-fixes/   (props changed)
    cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
    cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java
    cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd
    cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
    cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
    cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
    cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml

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

Modified: cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java?rev=1343125&r1=1343124&r2=1343125&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
Mon May 28 02:19:06 2012
@@ -88,6 +88,7 @@ public class JettyHTTPServerEngine
     private Boolean isReuseAddress = true;
     private Boolean continuationsEnabled = true;
     private int maxIdleTime = 200000;
+    private Boolean sendServerVersion = true;
     private int servantCount;
     private Server server;
     private Connector connector;
@@ -283,6 +284,8 @@ public class JettyHTTPServerEngine
             // create a new jetty server instance if there is no server there           

             server = new Server();
             
+            server.setSendServerVersion(getSendServerVersion());
+            
             if (mBeanContainer != null) {
                 server.getContainer().addEventListener(mBeanContainer);
             }
@@ -746,5 +749,13 @@ public class JettyHTTPServerEngine
     public ThreadingParameters getThreadingParameters() {
         return threadingParameters;
     }
+
+    public void setSendServerVersion(Boolean sendServerVersion) {
+        this.sendServerVersion = sendServerVersion;
+    }
+
+    public Boolean getSendServerVersion() {
+        return sendServerVersion;
+    }
     
 }

Modified: cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java?rev=1343125&r1=1343124&r2=1343125&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java
Mon May 28 02:19:06 2012
@@ -75,6 +75,12 @@ public class JettyHTTPServerEngineBeanDe
         if (maxIdleTimeStr != null && !"".equals(maxIdleTimeStr.trim())) {
             bean.addPropertyValue("maxIdleTime", maxIdleTimeStr);
         }
+        
+        String sendServerVersionStr = element.getAttribute("sendServerVersion");
+        if (sendServerVersionStr != null && sendServerVersionStr.length() > 0)
{
+            bean.addPropertyValue("sendServerVersion", sendServerVersionStr);
+        }
+        
         ValueHolder busValue = ctx.getContainingBeanDefinition()
             .getConstructorArgumentValues().getArgumentValue(0, Bus.class);
         bean.addPropertyValue("bus", busValue.getValue());

Modified: cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd?rev=1343125&r1=1343124&r2=1343125&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd
(original)
+++ cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd
Mon May 28 02:19:06 2012
@@ -152,6 +152,12 @@
                 <xs:documentation>Specifies the maximum idle time for a jetty connection.
The timer is reset whenever there are any read or write actions on the underlying stream.</xs:documentation>

            </xs:annotation>
        </xs:attribute>
+       <xs:attribute name="sendServerVersion" type="ptp:ParameterizedBoolean">
+           <xs:annotation>
+                <xs:documentation>Specifies if Jetty Server prevent the Server: http
header being sent. Server: http header will be sent if this attribute is set to true or omitted,
won't be sent otherwise.</xs:documentation>
+             </xs:annotation>
+       </xs:attribute>
+
     </xs:complexType>
     
     <xs:complexType name="JettyHTTPServerEngineFactoryConfigType">

Modified: cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java?rev=1343125&r1=1343124&r2=1343125&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
Mon May 28 02:19:06 2012
@@ -132,6 +132,7 @@ public class ApplicationContextTest exte
         
         engine = (JettyHTTPServerEngine)jd2.getEngine();
         assertEquals(40000, engine.getMaxIdleTime());
+        assertFalse(engine.getSendServerVersion());
         assertEquals(99, engine.getThreadingParameters().getMinThreads());
         assertEquals(777, engine.getThreadingParameters().getMaxThreads());
         assertTrue("The engine should support session manager", engine.isSessionSupport());

Modified: cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties?rev=1343125&r1=1343124&r2=1343125&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
(original)
+++ cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
Mon May 28 02:19:06 2012
@@ -26,4 +26,5 @@ engine.port.zero.minThreads=21
 engine.port.zero.maxThreads=389
 engine.port.nine.one.minThreads=99
 engine.port.nine.one.maxThreads=777
-engine.port.nine.one.maxIdle=40000
\ No newline at end of file
+engine.port.nine.one.maxIdle=40000
+engine.port.nine.one.sendServerVersion=false

Modified: cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml?rev=1343125&r1=1343124&r2=1343125&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
(original)
+++ cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
Mon May 28 02:19:06 2012
@@ -80,7 +80,7 @@
 	      <hj:threadingParameters minThreads="${engine.port.zero.minThreads}" maxThreads="${engine.port.zero.maxThreads}"/>
 	   </hj:engine>
 	   
-	   <hj:engine port="$(engine.port.nine.one)" maxIdleTime="$(engine.port.nine.one.maxIdle)">
+	   <hj:engine port="$(engine.port.nine.one)" maxIdleTime="$(engine.port.nine.one.maxIdle)"
sendServerVersion="$(engine.port.nine.one.sendServerVersion)">
 	       <hj:threadingParameters minThreads="${engine.port.nine.one.minThreads}"
 	        maxThreads="${engine.port.nine.one.maxThreads}"/>	      
 	     <hj:connector>

Modified: cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml?rev=1343125&r1=1343124&r2=1343125&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml
(original)
+++ cxf/branches/2.5.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml
Mon May 28 02:19:06 2012
@@ -65,7 +65,7 @@
 	      <hj:threadingParameters minThreads="21" maxThreads="389"/>
 	   </hj:engine>
 	   
-	   <hj:engine port="9001" maxIdleTime="40000">
+	   <hj:engine port="9001" maxIdleTime="40000" sendServerVersion="false">
 	       <hj:threadingParameters minThreads="99" maxThreads="777"/>	      
 	     <hj:connector>
            <beans:bean class="org.eclipse.jetty.server.bio.SocketConnector">



Mime
View raw message