camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject svn commit: r730276 - in /activemq/camel/branches/camel-1.x: ./ components/camel-restlet/src/main/java/org/apache/camel/component/restlet/ components/camel-restlet/src/test/java/org/apache/camel/component/restlet/
Date Wed, 31 Dec 2008 00:17:32 GMT
Author: wtam
Date: Tue Dec 30 16:17:31 2008
New Revision: 730276

URL: http://svn.apache.org/viewvc?rev=730276&view=rev
Log:
Merged revisions 730275 via svnmerge from 
https://svn.apache.org/repos/asf/activemq/camel/trunk

........
  r730275 | wtam | 2008-12-30 19:11:48 -0500 (Tue, 30 Dec 2008) | 1 line
  
  [CAMEL-1203] applied patch from Przemyslaw Budzik to set response code 404 when RestletConsumer
can't find a handler
........

Modified:
    activemq/camel/branches/camel-1.x/   (props changed)
    activemq/camel/branches/camel-1.x/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/MethodBasedRouter.java
    activemq/camel/branches/camel-1.x/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestRouteBuilderTest.java

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 30 16:17:31 2008
@@ -1 +1 @@
-/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712692,712925,713013,713107,713136,713273,713290,713292,713295,713314,713475,713625,713932,713944,714032,717965,717989,718242,718273,718312-718515,719163-719184,719334,719339,719524,719662,719848,719851,719855,719864,719978-719979,720207,720435-720437,720806,721272,721331,721333-721334,721360,721669,721764,721813,721985,722005,722070,722110,722415,722438,722726,722845,722878,723264,723314,723325-723327,723409,723835,723966,724122,724619,724681,725040,725309-725320,725340,725351,725569-725572,725612,725652-725660,725715,725883,726339,726640-726645,726932,727113,727375,727377,727624,727713,727946,729401,729892,730154
+/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756,711784,711859,711874,711962,711971,712064,712119,712148,712662,712692,712925,713013,713107,713136,713273,713290,713292,713295,713314,713475,713625,713932,713944,714032,717965,717989,718242,718273,718312-718515,719163-719184,719334,719339,719524,719662,719848,719851,719855,719864,719978-719979,720207,720435-720437,720806,721272,721331,721333-721334,721360,721669,721764,721813,721985,722005,722070,722110,722415,722438,722726,722845,722878,723264,723314,723325-723327,723409,723835,723966,724122,724619,724681,725040,725309-725320,725340,725351,725569-725572,725612,725652-725660,725715,725883,726339,726640-726645,726932,727113,727375,727377,727624,727713,727946,729401,729892,730154,730275

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: activemq/camel/branches/camel-1.x/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/MethodBasedRouter.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/MethodBasedRouter.java?rev=730276&r1=730275&r2=730276&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/MethodBasedRouter.java
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/MethodBasedRouter.java
Tue Dec 30 16:17:31 2008
@@ -26,6 +26,7 @@
 import org.restlet.data.Method;
 import org.restlet.data.Request;
 import org.restlet.data.Response;
+import org.restlet.data.Status;
 
 /**
  * A simple router that routes requests to target Restlets based on method. 
@@ -56,6 +57,7 @@
             if (LOG.isDebugEnabled()) {
                 LOG.debug("No route for request method: " + request.getMethod());
             }
+            response.setStatus(Status.CLIENT_ERROR_NOT_FOUND);
         }
     }
 

Modified: activemq/camel/branches/camel-1.x/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestRouteBuilderTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestRouteBuilderTest.java?rev=730276&r1=730275&r2=730276&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestRouteBuilderTest.java
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestRouteBuilderTest.java
Tue Dec 30 16:17:31 2008
@@ -27,6 +27,7 @@
 import org.restlet.data.Protocol;
 import org.restlet.data.Request;
 import org.restlet.data.Response;
+import org.restlet.data.Status;
 
 public class RestRouteBuilderTest extends ContextTestSupport {
     private static final String ID = "89531";
@@ -82,8 +83,9 @@
         Client client = new Client(Protocol.HTTP);
         Response response = client.handle(new Request(Method.POST, 
                 "http://localhost:8080/orders/99991/6"));
-        // expect null as no Restlet consumer to handle POST method
-        assertNull(response.getEntity().getText());
+        // expect error status as no Restlet consumer to handle POST method
+        assertEquals(Status.CLIENT_ERROR_NOT_FOUND, response.getStatus());
+        assertNotNull(response.getEntity().getText());
     }
 
 }



Mime
View raw message