cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1091465 - in /cxf/branches/2.3.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
Date Tue, 12 Apr 2011 15:24:43 GMT
Author: sergeyb
Date: Tue Apr 12 15:24:43 2011
New Revision: 1091465

URL: http://svn.apache.org/viewvc?rev=1091465&view=rev
Log:
Merged revisions 1091450 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1091450 | sergeyb | 2011-04-12 16:15:35 +0100 (Tue, 12 Apr 2011) | 1 line
  
  [JAX-RS] Minor update for debugging Content-Types
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Apr 12 15:24:43 2011
@@ -1 +1 @@
-/cxf/trunk:1091428
+/cxf/trunk:1091428,1091450

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java?rev=1091465&r1=1091464&r2=1091465&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
Tue Apr 12 15:24:43 2011
@@ -41,6 +41,7 @@ import org.apache.cxf.message.Message;
 public class RequestPreprocessor {
     
     private static final String ACCEPT_QUERY = "_type";
+    private static final String CTYPE_QUERY = "_ctype";
     private static final String METHOD_QUERY = "_method";
     private static final String METHOD_HEADER = "X-HTTP-Method-Override";
     
@@ -76,6 +77,7 @@ public class RequestPreprocessor {
         
         MultivaluedMap<String, String> queries = u.getQueryParameters();
         handleTypeQuery(m, queries);
+        handleCType(m, queries);
         handleMethod(m, queries, new HttpHeadersImpl(m));
         Response r = checkMetadataRequest(m);
         if (r == null) {
@@ -153,6 +155,13 @@ public class RequestPreprocessor {
         }
     }
     
+    private void handleCType(Message m, MultivaluedMap<String, String> queries) {
+        String type = queries.getFirst(CTYPE_QUERY);
+        if (type != null) {
+            m.put(Message.CONTENT_TYPE, type);
+        }
+    }
+    
     @SuppressWarnings("unchecked")
     private void updateAcceptTypeHeader(Message m, String acceptValue) {
         m.put(Message.ACCEPT_CONTENT_TYPE, acceptValue);



Mime
View raw message