This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new 96e71237ba Revert "CXF-8478: fixing 
jaxrs.ee.rs.container.requestcontext setRequestUriTwoUrisTest"
96e71237ba is described below

commit 96e71237bae2eb987a5fbe67d21e9e1e19f2d158
Author: Andriy Redko <[email protected]>
AuthorDate: Sat Jun 4 09:00:57 2022 -0400

    Revert "CXF-8478: fixing jaxrs.ee.rs.container.requestcontext 
setRequestUriTwoUrisTest"
    
    This reverts commit 905f4f91e4d0b5c4d145729f16bad90b1847f0be.
---
 .../org/apache/cxf/jaxrs/impl/ContainerRequestContextImpl.java     | 7 +------
 .../src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java   | 2 --
 .../org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java  | 6 ------
 3 files changed, 1 insertion(+), 14 deletions(-)

diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ContainerRequestContextImpl.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ContainerRequestContextImpl.java
index 4222cbacf2..a13f6ee1ea 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ContainerRequestContextImpl.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ContainerRequestContextImpl.java
@@ -28,7 +28,6 @@ import javax.ws.rs.core.Request;
 import javax.ws.rs.core.SecurityContext;
 import javax.ws.rs.core.UriInfo;
 
-import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.io.DelegatingInputStream;
 import org.apache.cxf.jaxrs.utils.ExceptionUtils;
@@ -109,11 +108,7 @@ public class ContainerRequestContextImpl extends 
AbstractRequestContextImpl
             String baseUriString = new UriInfoImpl(m).getBaseUri().toString();
             String requestUriString = requestUri.toString();
             if (!requestUriString.startsWith(baseUriString)) {
-                String path = requestUri.getRawPath();
-                if (StringUtils.isEmpty(path)) {
-                    path = "/";
-                }
-                setRequestUri(requestUri.resolve("/"), URI.create(path));
+                setRequestUri(requestUri, URI.create("/"));
                 return;
             }
             requestUriString = 
requestUriString.substring(baseUriString.length());
diff --git 
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java 
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java
index 4eb9a96667..9071b28ab4 100644
--- 
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java
+++ 
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java
@@ -147,8 +147,6 @@ public class BookServer20 extends 
AbstractServerTestServerBase {
 
             if ("wrongpath".equals(path)) {
                 
context.setRequestUri(URI.create("/bookstore/bookheaders/simple"));
-            } else if ("absolutepath".equals(path)) {
-                
context.setRequestUri(URI.create("http://localhost:888/bookstore/bookheaders/simple";));
             } else if ("throwException".equals(path)) {
                 context.setProperty("filterexception", "prematch");
                 throw new InternalServerErrorException(
diff --git 
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
 
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
index 7d9dae6af6..0f0f5e2b67 100644
--- 
a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
+++ 
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
@@ -355,12 +355,6 @@ public class JAXRS20ClientServerBookTest extends 
AbstractBusClientServerTestBase
         String address = "http://localhost:"; + PORT + "/wrongpath";
         doTestGetBookAsync(address, false);
     }
-    
-    @Test
-    public void testGetBookAbsolutePathAsync() throws Exception {
-        String address = "http://localhost:"; + PORT + "/absolutepath";
-        doTestGetBookAsync(address, false);
-    }
 
     @Test
     public void testPostCollectionGenericEntity() throws Exception {

Reply via email to