axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r374477 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http: AbstractHTTPSender.java CommonsHTTPTransportSender.java
Date Thu, 02 Feb 2006 19:49:51 GMT
Author: dims
Date: Thu Feb  2 11:49:48 2006
New Revision: 374477

URL: http://svn.apache.org/viewcvs?rev=374477&view=rev
Log:
Fix for AXIS2-421 - force client http 1.0 is not possible from Yves Langisch

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractHTTPSender.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/transport/http/AbstractHTTPSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractHTTPSender.java?rev=374477&r1=374476&r2=374477&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
Thu Feb  2 11:49:48 2006
@@ -56,6 +56,23 @@
         this.chunked = chunked;
     }
 
+    public void setHttpVersion(String version) throws AxisFault {
+        if (version != null) {
+            if (HTTPConstants.HEADER_PROTOCOL_11.equals(version)) {
+                this.httpVersion = HTTPConstants.HEADER_PROTOCOL_11;
+            } else
+            if (HTTPConstants.HEADER_PROTOCOL_10.equals(version)) {
+                this.httpVersion = HTTPConstants.HEADER_PROTOCOL_10;
+                // chunked is not possible with HTTP/1.0
+                this.chunked = false;
+            } else {
+                throw new AxisFault(
+                        "Parameter " + HTTPConstants.PROTOCOL_VERSION
+                                + " Can have values only HTTP/1.0 or HTTP/1.1");
+            }
+        }
+    }
+
     /**
      * Helper method to Proxy and NTLM authentication
      *

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=374477&r1=374476&r2=374477&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
Thu Feb  2 11:49:48 2006
@@ -278,6 +278,7 @@
                         MessageContextConstants.CHUNKED));
             }
 
+            sender.setHttpVersion(httpVersion);
             sender.setChunked(chunked);
             sender.setFormat(format);
 



Mime
View raw message