cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1036007 - in /cxf/branches/2.3.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
Date Wed, 17 Nov 2010 12:43:19 GMT
Author: sergeyb
Date: Wed Nov 17 12:43:18 2010
New Revision: 1036007

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

........
  r1036004 | sergeyb | 2010-11-17 12:40:35 +0000 (Wed, 17 Nov 2010) | 1 line
  
  Minor fix to do with handling trailing slashes for WADL queries working well
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
    svn:mergeinfo = /cxf/trunk:1036004

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Nov 17 12:43:18 2010
@@ -1 +1 @@
-/cxf/trunk:1-1022155,1022157-1023401,1023420-1030540,1030542-1031074,1031076-1033529,1033531,1033533-1033888,1033890-1033925,1033927-1034174,1034637,1035203,1035206,1035220,1035302,1035377,1035391,1035428,1035559,1035614,1035787,1035796,1035798
+/cxf/trunk:1-1022155,1022157-1023401,1023420-1030540,1030542-1031074,1031076-1033529,1033531,1033533-1033888,1033890-1033925,1033927-1034174,1034637,1035203,1035206,1035220,1035302,1035377,1035391,1035428,1035559,1035614,1035787,1035796,1035798,1036004

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java?rev=1036007&r1=1036006&r2=1036007&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
Wed Nov 17 12:43:18 2010
@@ -170,8 +170,8 @@ public class RequestPreprocessor {
     public Response checkMetadataRequest(Message m) {
         String query = (String)m.get(Message.QUERY_STRING);
         if (query != null && query.contains(WadlGenerator.WADL_QUERY)) {
-            String requestURI = (String)m.get(Message.REQUEST_URI);
-            String baseAddress = HttpUtils.getBaseAddress(m);
+            String requestURI = getValueWithoutSlash((String)m.get(Message.REQUEST_URI));
+            String baseAddress = getValueWithoutSlash(HttpUtils.getBaseAddress(m));
             if (baseAddress.equals(requestURI)) {
                 List<ProviderInfo<RequestHandler>> shs = ProviderFactory.getInstance(m).getRequestHandlers();
                 // this is actually being tested by ProviderFactory unit tests but just in
case
@@ -184,6 +184,10 @@ public class RequestPreprocessor {
         return null;
     }
     
+    private static String getValueWithoutSlash(String value) {
+        return value.endsWith("/") ? value.substring(0, value.length() - 1) : value;
+    }
+    
     public Response checkCodeRequest(Message m) {
         String query = (String)m.get(Message.QUERY_STRING);
         if (query != null && (query.contains(CodeGeneratorProvider.CODE_QUERY) 



Mime
View raw message