servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r400216 - /incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpMarshaler.java
Date Sat, 06 May 2006 00:13:59 GMT
Author: gnodet
Date: Fri May  5 17:13:56 2006
New Revision: 400216

URL: http://svn.apache.org/viewcvs?rev=400216&view=rev
Log:
SM-427: additional CGI headers in http marhsaler

Modified:
    incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpMarshaler.java

Modified: incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpMarshaler.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpMarshaler.java?rev=400216&r1=400215&r2=400216&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpMarshaler.java
(original)
+++ incubator/servicemix/trunk/servicemix-components/src/main/java/org/apache/servicemix/components/http/HttpMarshaler.java
Fri May  5 17:13:56 2006
@@ -40,10 +40,22 @@
  */
 public class HttpMarshaler extends MarshalerSupport {
 
+    public static final String AUTH_TYPE = "AUTH_TYPE";
+    public static final String CONTENT_LENGTH = "CONTENT_LENGTH";
+    public static final String CONTENT_TYPE = "CONTENT_TYPE";
+    public static final String DOCUMENT_ROOT = "DOCUMENT_ROOT";
+    public static final String PATH_INFO = "PATH_INFO";
+    public static final String PATH_TRANSLATED = "PATH_TRANSLATED";
+    public static final String QUERY_STRING = "QUERY_STRING";
     public static final String REMOTE_ADDRESS = "REMOTE_ADDR";
     public static final String REMOTE_HOST = "REMOTE_HOST";
     public static final String REMOTE_USER = "REMOTE_USER";
+    public static final String REQUEST_METHOD = "REQUEST_METHOD";
     public static final String REQUEST_URI = "REQUEST_URI";
+    public static final String SCRIPT_NAME = "SCRIPT_NAME";
+    public static final String SERVER_NAME = "SERVER_NAME";
+    public static final String SERVER_PORT = "SERVER_PORT";
+    public static final String SERVER_PROTOCOL = "SERVER_PROTOCOL";
     
     protected static final Source EMPTY_CONTENT = new StringSource("<payload/>");
 
@@ -94,10 +106,22 @@
             String value = request.getHeader(name);
             exchange.setProperty(name, value);
         }
+        exchange.setProperty(AUTH_TYPE, request.getAuthType());
+        exchange.setProperty(CONTENT_LENGTH, String.valueOf(request.getContentLength()));
+        exchange.setProperty(CONTENT_TYPE, request.getContentType());
+        exchange.setProperty(DOCUMENT_ROOT, request.getRealPath("/"));
+        exchange.setProperty(PATH_INFO, request.getPathInfo());
+        exchange.setProperty(PATH_TRANSLATED, request.getPathTranslated());
+        exchange.setProperty(QUERY_STRING, request.getQueryString());
         exchange.setProperty(REMOTE_ADDRESS, request.getRemoteAddr());
         exchange.setProperty(REMOTE_HOST, request.getRemoteHost());
         exchange.setProperty(REMOTE_USER, request.getRemoteUser());
+        exchange.setProperty(REQUEST_METHOD, request.getMethod());
         exchange.setProperty(REQUEST_URI, request.getRequestURL());
+        exchange.setProperty(SCRIPT_NAME, request.getServletPath());
+        exchange.setProperty(SERVER_NAME, request.getServerName());
+        exchange.setProperty(SERVER_PORT, String.valueOf(request.getServerPort()));
+        exchange.setProperty(SERVER_PROTOCOL, request.getProtocol());
     }
     
     protected void addHttpHeaders(HttpServletResponse response, NormalizedMessage normalizedMessage)
{



Mime
View raw message