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/26 07:52:45 UTC

svn commit: r372463 - /webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c

Author: sahan
Date: Wed Jan 25 22:52:41 2006
New Revision: 372463

URL: http://svn.apache.org/viewcvs?rev=372463&view=rev
Log:
added char-set passing to xml reader

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

Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c?rev=372463&r1=372462&r2=372463&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c Wed Jan 25 22:52:41 2006
@@ -146,17 +146,15 @@
 					AXIS2_TRANSPORT_OUT, out_stream, AXIS2_FALSE);
 	AXIS2_MSG_CTX_SET_SERVER_SIDE(msg_ctx, env, AXIS2_TRUE);
 	
+	char_set = axis2_http_transport_utils_get_charset_enc(env,content_type);
 	xml_reader = axis2_xml_reader_create_for_memory(env, 
 						axis2_http_transport_utils_on_data_request, 
-						(void *)&callback_ctx, NULL);
+						(void *)&callback_ctx, char_set);
 	if(NULL == xml_reader)
 	{
 		return AXIS2_FAILURE;
 	}
-	char_set = axis2_http_transport_utils_get_charset_enc(env,content_type);
-	/* TODO set the charset of the stream before (at least default)
-	 *	we read them
-	 */
+
 	AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_CHARACTER_SET_ENCODING,
 					char_set, AXIS2_TRUE);
 	om_builder = axis2_om_stax_builder_create(env, xml_reader);
@@ -714,7 +712,9 @@
 	{
 		return AXIS2_STRDUP(AXIS2_HTTP_HEADER_DEFAULT_CHAR_ENCODING, env);
 	}
-	return AXIS2_STRDUP(tmp, env);
+	tmp2 =  AXIS2_STRDUP(tmp, env);
+	AXIS2_FREE((*env)->allocator, tmp_content_type);
+	return tmp2;
 }
 
 int