cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1075817 - in /cxf/branches/2.3.x-fixes: ./ rt/transports/http-jetty/ rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/ systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/
Date Tue, 01 Mar 2011 13:41:00 GMT
Author: ffang
Date: Tue Mar  1 13:40:59 2011
New Revision: 1075817

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

........
  r1075784 | ffang | 2011-03-01 19:41:46 +0800 (二, 01  3 2011) | 1 line
  
  [CXF-3369]jetty SecurityHandler should be on top of org.apache.cxf.transport.http_jetty.JettyHTTPHandler
........

Added:
    cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthServer.java
      - copied unchanged from r1075784, cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthServer.java
    cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthTest.java
      - copied unchanged from r1075784, cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthTest.java
    cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jetty-realm.properties
      - copied unchanged from r1075784, cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jetty-realm.properties
    cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jettyBasicAuthServer.xml
      - copied unchanged from r1075784, cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jettyBasicAuthServer.xml
Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/transports/http-jetty/pom.xml
    cxf/branches/2.3.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
    cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/GreeterImpl.java

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

Modified: cxf/branches/2.3.x-fixes/rt/transports/http-jetty/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/transports/http-jetty/pom.xml?rev=1075817&r1=1075816&r2=1075817&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/transports/http-jetty/pom.xml (original)
+++ cxf/branches/2.3.x-fixes/rt/transports/http-jetty/pom.xml Tue Mar  1 13:40:59 2011
@@ -59,6 +59,11 @@
         </dependency>
         <dependency>
             <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-security</artifactId>
+            <version>${cxf.jetty.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
             <artifactId>jetty-jmx</artifactId>
             <version>${cxf.jetty.version}</version>
             <optional>true</optional>

Modified: cxf/branches/2.3.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.3.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java?rev=1075817&r1=1075816&r2=1075817&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
Tue Mar  1 13:40:59 2011
@@ -37,6 +37,7 @@ import org.apache.cxf.configuration.jsse
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.transport.HttpUriMapper;
 import org.apache.cxf.transport.https_jetty.JettySslConnectorFactory;
+import org.eclipse.jetty.security.SecurityHandler;
 import org.eclipse.jetty.server.AbstractConnector;
 import org.eclipse.jetty.server.Connector;
 import org.eclipse.jetty.server.Handler;
@@ -358,6 +359,14 @@ public class JettyHTTPServerEngine
                     if (h instanceof DefaultHandler) {
                         defaultHandler = (DefaultHandler) h;
                     } else {
+                        if ((h instanceof SecurityHandler) 
+                            && ((SecurityHandler)h).getHandler() == null) {
+                            //if h is SecurityHandler(such as ConstraintSecurityHandler)
+                            //then it need be on top of JettyHTTPHandler
+                            //set JettyHTTPHandler as inner handler if 
+                            //inner handler is null
+                            ((SecurityHandler)h).setHandler(handler);
+                        } 
                         handlerCollection.addHandler(h);
                     }
                 }

Modified: cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/GreeterImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/GreeterImpl.java?rev=1075817&r1=1075816&r2=1075817&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/GreeterImpl.java
(original)
+++ cxf/branches/2.3.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/GreeterImpl.java
Tue Mar  1 13:40:59 2011
@@ -46,7 +46,7 @@ import org.apache.hello_world_soap_http.
 public class GreeterImpl implements Greeter {
 
     public String greetMe(String me) {
-        return null;
+        return "Hello " + me;
     }
 
     public String greetMeLater(long delay) {



Mime
View raw message