You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2006/01/31 09:57:38 UTC

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

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);