cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1343128 - in /cxf/branches/2.4.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:34:02 GMT
Author: ffang
Date: Mon May 28 02:34:02 2012
New Revision: 1343128

URL: http://svn.apache.org/viewvc?rev=1343128&view=rev
Log:
Merged revisions 1343125 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

................
  r1343125 | ffang | 2012-05-28 10:19:06 +0800 (一, 28  5 2012) | 9 lines
  
  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.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
    cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java
    cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd
    cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
    cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml

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

Modified: cxf/branches/2.4.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.4.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java?rev=1343128&r1=1343127&r2=1343128&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
Mon May 28 02:34:02 2012
@@ -96,6 +96,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;
@@ -304,6 +305,8 @@ public class JettyHTTPServerEngine
             server = new Server();
             
             Container.Listener mBeanContainer = factory.getMBeanContainer();
+            server.setSendServerVersion(getSendServerVersion());
+            
             if (mBeanContainer != null) {
                 server.getContainer().addEventListener(mBeanContainer);
             }
@@ -756,5 +759,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.4.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.4.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java?rev=1343128&r1=1343127&r2=1343128&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java
Mon May 28 02:34:02 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.4.x-fixes/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd?rev=1343128&r1=1343127&r2=1343128&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd
(original)
+++ cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd
Mon May 28 02:34:02 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.4.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.4.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java?rev=1343128&r1=1343127&r2=1343128&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
Mon May 28 02:34:02 2012
@@ -127,6 +127,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.4.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.4.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml?rev=1343128&r1=1343127&r2=1343128&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml
(original)
+++ cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml
Mon May 28 02:34:02 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