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/14 05:55:51 UTC

svn commit: r377619 - /webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c

Author: sahan
Date: Mon Feb 13 20:55:50 2006
New Revision: 377619

URL: http://svn.apache.org/viewcvs?rev=377619&view=rev
Log:
HTTP/1.1 needs Host header. So added

Modified:
    webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c?rev=377619&r1=377618&r2=377619&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c Mon Feb 13 20:55:50 2006
@@ -262,6 +262,14 @@
 	http_header = axis2_http_header_create(env, AXIS2_HTTP_HEADER_CONTENT_TYPE, 
 						content_type);
 	AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
+	if(0 == AXIS2_STRCMP(sender_impl->http_version, 
+		AXIS2_HTTP_HEADER_PROTOCOL_11))
+	{
+		http_header = axis2_http_header_create(env, 
+						AXIS2_HTTP_HEADER_HOST, 
+						AXIS2_URL_GET_SERVER(url, env));
+		AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
+	}
 	AXIS2_HTTP_SIMPLE_REQUEST_SET_BODY_STRING(request, env, buffer);
 	axis2_soap_over_http_sender_get_timeout_values(sender, env, msg_ctx);
 	AXIS2_HTTP_CLIENT_SET_TIMEOUT(sender_impl->client, env,