You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2006/02/07 06:36:24 UTC

svn commit: r375491 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2: context/MessageContextConstants.java transport/http/CommonsHTTPTransportSender.java

Author: saminda
Date: Mon Feb  6 21:36:21 2006
New Revision: 375491

URL: http://svn.apache.org/viewcvs?rev=375491&view=rev
Log:
Allow HttpVersion selection.{1.0/1.1}. User can set Http protocol 
version either using axis2.xml or at runtime.

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java?rev=375491&r1=375490&r2=375491&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContextConstants.java Mon Feb  6 21:36:21 2006
@@ -21,4 +21,5 @@
     // this will contain the keys of all the properties that will be in the message context
     public static final String TRANSPORT_URL = "TransportURL";
     public static final String CHUNKED="__CHUNKED__";
+    String HTTP_PROTOCOL_VERSION = "__HTTP_PROTOCOL_VERSION__";
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java?rev=375491&r1=375490&r2=375491&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Mon Feb  6 21:36:21 2006
@@ -278,8 +278,14 @@
                         MessageContextConstants.CHUNKED));
             }
 
-            sender.setHttpVersion(httpVersion);
+            if (msgContext.getProperty(MessageContextConstants.HTTP_PROTOCOL_VERSION) != null) {
+                httpVersion = (String)msgContext.getProperty(MessageContextConstants.HTTP_PROTOCOL_VERSION);
+            }
+
+            // Following order needed to be preserved because,
+            // HTTP/1.0 does not support chunk encoding
             sender.setChunked(chunked);
+            sender.setHttpVersion(httpVersion);
             sender.setFormat(format);
 
             sender.send(msgContext, dataout, url, soapActionString);