You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2014/07/30 21:36:47 UTC

git commit: Update to JAXRS RequestPreprocessor to use 1.1 API

Repository: cxf
Updated Branches:
  refs/heads/master d721bd154 -> e9122c728


Update to JAXRS RequestPreprocessor to use 1.1 API


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

Branch: refs/heads/master
Commit: e9122c7280d1d15de213ad72c0c1d16dcc57b792
Parents: d721bd1
Author: Sergey Beryozkin <sb...@talend.com>
Authored: Wed Jul 30 22:36:28 2014 +0300
Committer: Sergey Beryozkin <sb...@talend.com>
Committed: Wed Jul 30 22:36:28 2014 +0300

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/e9122c72/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
index d9fa6fb..1a9e00f 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
@@ -147,7 +147,10 @@ public class RequestPreprocessor {
                               HttpHeaders headers) {
         String method = queries.getFirst(METHOD_QUERY);
         if (method == null) {
-            method = headers.getHeaderString(METHOD_HEADER);
+            List<String> list = headers.getRequestHeader(METHOD_HEADER);
+            if (list != null && list.size() == 1) {
+                method = list.get(0);
+            }
         }
         if (method != null) {
             m.put(Message.HTTP_REQUEST_METHOD, method);