cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [02/10] cxf git commit: [CXF-6785]AbstractHTTPDestination should handle the case when pathInfo of HttpServletRequest is null
Date Wed, 16 Mar 2016 15:05:56 GMT
[CXF-6785]AbstractHTTPDestination should handle the case when pathInfo of HttpServletRequest
is null

(cherry picked from commit 4fc5e7af1a6fc358931abdb17e0b250e87480ac4)


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1a377379
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1a377379
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1a377379

Branch: refs/heads/3.0.x-fixes
Commit: 1a37737904828f90fc4898263a5e667836eb49b0
Parents: bbb02cf
Author: Freeman Fang <freeman.fang@gmail.com>
Authored: Thu Feb 18 15:19:17 2016 +0800
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Wed Mar 16 10:58:02 2016 -0400

----------------------------------------------------------------------
 .../apache/cxf/transport/http/AbstractHTTPDestination.java    | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/1a377379/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
index 92a4866..76193fb 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
@@ -342,7 +342,12 @@ public abstract class AbstractHTTPDestination
             servletPath = "";
         }
         String contextServletPath = contextPath + servletPath;
-        inMessage.put(Message.PATH_INFO, contextServletPath + req.getPathInfo());
+        String pathInfo = req.getPathInfo();
+        if (pathInfo != null) {
+            inMessage.put(Message.PATH_INFO, contextServletPath + pathInfo);
+        } else {
+            inMessage.put(Message.PATH_INFO, requestURI);
+        }
         if (!StringUtils.isEmpty(requestURI)) {
             int index = requestURL.indexOf(requestURI);
             if (index > 0) {


Mime
View raw message