axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r373765 - /webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c
Date Tue, 31 Jan 2006 08:57:38 GMT
Author: sahan
Date: Tue Jan 31 00:57:32 2006
New Revision: 373765

URL: http://svn.apache.org/viewcvs?rev=373765&view=rev
Log:
axis2_soap_over_http_sender_send() now sets Content length header

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=373765&r1=373764&r2=373765&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 Tue
Jan 31 00:57:32 2006
@@ -175,7 +175,7 @@
 	int status_code = -1;
 	axis2_http_header_t *http_header = NULL;
 	axis2_http_simple_response_t *response = NULL;
-	
+		
     AXIS2_FUNC_PARAM_CHECK(sender, env, AXIS2_FAILURE);
 	AXIS2_PARAM_CHECK((*env)->error, msg_ctx, AXIS2_FAILURE);
 	AXIS2_PARAM_CHECK((*env)->error, out, AXIS2_FAILURE);
@@ -227,7 +227,14 @@
 						soap_action);
 	AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
 	AXIS2_HTTP_SIMPLE_REQUEST_SET_BODY_STRING(request, env, buffer);
-	
+	if(AXIS2_FALSE == sender_impl->chunked)
+	{
+		axis2_char_t tmp_buf[10];
+		sprintf(tmp_buf, "%d", strlen(buffer));
+		http_header = axis2_http_header_create(env, 
+						AXIS2_HTTP_HEADER_CONTENT_LENGTH, tmp_buf);
+		AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
+	}
 	axis2_soap_over_http_sender_get_timeout_values(sender, env, msg_ctx);
 	AXIS2_HTTP_CLIENT_SET_TIMEOUT(sender_impl->client, env, 
 						sender_impl->so_timeout);



Mime
View raw message