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:23:26 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes dfb5f378b -> a27f27bc2


[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/a27f27bc
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a27f27bc
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a27f27bc

Branch: refs/heads/3.1.x-fixes
Commit: a27f27bc291524b915971e867625afb90864e7d3
Parents: dfb5f37
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:22:38 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/a27f27bc/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