cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject cxf git commit: [CXF-6785]AbstractHTTPDestination should handle the case when pathInfo of HttpServletRequest is null
Date Thu, 18 Feb 2016 07:19:37 GMT
Repository: cxf
Updated Branches:
  refs/heads/master fbcb69296 -> 4fc5e7af1


[CXF-6785]AbstractHTTPDestination should handle the case when pathInfo of HttpServletRequest
is null


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

Branch: refs/heads/master
Commit: 4fc5e7af1a6fc358931abdb17e0b250e87480ac4
Parents: fbcb692
Author: Freeman Fang <freeman.fang@gmail.com>
Authored: Thu Feb 18 15:19:17 2016 +0800
Committer: Freeman Fang <freeman.fang@gmail.com>
Committed: Thu Feb 18 15:19:17 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/4fc5e7af/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 11c48d2..882cb63 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
@@ -341,7 +341,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