camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r774659 - /camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpMessage.java
Date Thu, 14 May 2009 06:53:45 GMT
Author: ningjiang
Date: Thu May 14 06:53:45 2009
New Revision: 774659

URL: http://svn.apache.org/viewvc?rev=774659&view=rev
Log:
CAMEL-1609 removed the duplicated code from HttpMessage

Modified:
    camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpMessage.java

Modified: camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpMessage.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpMessage.java?rev=774659&r1=774658&r2=774659&view=diff
==============================================================================
--- camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpMessage.java
(original)
+++ camel/trunk/components/camel-http/src/main/java/org/apache/camel/component/http/HttpMessage.java
Thu May 14 06:53:45 2009
@@ -56,34 +56,5 @@
         } catch (IOException e) {
             throw new RuntimeCamelException(e);
         }
-    }
-
-    @Override
-    protected void populateInitialHeaders(Map<String, Object> map) {
-        // populate the http request headers
-        Enumeration names = request.getHeaderNames();
-        while (names.hasMoreElements()) {
-            String name = (String)names.nextElement();
-            Object value = request.getHeader(name);
-            map.put(name, value);
-        }
-
-        //if the request method is Get, we also populate the http request parameters
-        if (request.getMethod().equalsIgnoreCase("GET")) {
-            names = request.getParameterNames();
-            while (names.hasMoreElements()) {
-                String name = (String)names.nextElement();
-                Object value = request.getParameter(name);
-                map.put(name, value);
-            }
-        }
-        
-        // store the method and query and other info in headers
-        map.put(HttpConstants.HTTP_METHOD, request.getMethod());
-        map.put(HttpConstants.HTTP_QUERY, request.getQueryString());
-        map.put(HttpConstants.HTTP_PATH, request.getPathInfo());
-        map.put(HttpConstants.HTTP_CONTENT_TYPE, request.getContentType());
-        map.put(HttpConstants.HTTP_CHARACTER_ENCODING, request.getCharacterEncoding());
-
-    }
+    }   
 }



Mime
View raw message