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 su...@apache.org on 2008/06/30 06:27:21 UTC

svn commit: r672697 - /webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c

Author: supun
Date: Sun Jun 29 21:27:21 2008
New Revision: 672697

URL: http://svn.apache.org/viewvc?rev=672697&view=rev
Log:
Fixing a incorrect calculation of buffer length using strlen function. The length of the stream can be taken directly.

Modified:
    webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c

Modified: webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c?rev=672697&r1=672696&r2=672697&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/util/http_transport_utils.c Sun Jun 29 21:27:21 2008
@@ -2736,7 +2736,7 @@
 			axis2_engine_t *engine = axis2_engine_create(env, conf_ctx);
 			if (!engine)
 			{
-				/* Critical error, cannot proceed, Apache will send default  document for 500 */
+				/* Critical error, cannot proceed, send defaults document for 500 */
 				return AXIS2_CRITICAL_FAILURE;
 			}
 			if (axis2_msg_ctx_get_is_soap_11(msg_ctx, env))
@@ -2755,14 +2755,9 @@
 			axis2_engine_send_fault(engine, env, fault_ctx);
 			if (out_stream)
 			{
-				response->response_data  = axutil_stream_get_buffer(out_stream, env);
-				if(response->response_data)
-				{
-					response->response_data_length = axutil_strlen (response->response_data);
-				}
-				
+				response->response_data  = axutil_stream_get_buffer(out_stream, env);				
+				response->response_data_length = axutil_stream_get_len (out_stream, env);								
 			}
-
 			/* In case of a SOAP Fault, we have to set the status to 500, but still return */
 			status = AXIS2_SUCCESS;
 			response->http_status_code = AXIS2_HTTP_RESPONSE_INTERNAL_SERVER_ERROR_CODE_VAL;