From f891acd70beea9a99fc736373933fc0244db82e4 Mon Sep 17 00:00:00 2001 From: nandika Date: Thu, 22 Jul 2010 11:02:48 +0000 Subject: mtom with chunking issue fixed git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@966575 13f79535-47bb-0310-9956-ffa450edef68 --- src/core/transport/http/server/apache2/apache2_worker.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/core/transport/http/server/apache2/apache2_worker.c b/src/core/transport/http/server/apache2/apache2_worker.c index 0a38541..998ec00 100644 --- a/src/core/transport/http/server/apache2/apache2_worker.c +++ b/src/core/transport/http/server/apache2/apache2_worker.c @@ -440,7 +440,20 @@ axis2_apache2_worker_process_request( headers = axis2_apache_worker_get_headers(env, request); axis2_msg_ctx_set_transport_headers(msg_ctx, env, headers); - + if(headers) + { + /** Transfer encoding property set in message context is used to check whether to + create a chunked stream or not in transport_utils_process_request. For apache stream, + using chunked stream will fail. */ + axis2_http_header_t *encoding_header = NULL; + encoding_header = (axis2_http_header_t *)axutil_hash_get(headers, + AXIS2_HTTP_HEADER_TRANSFER_ENCODING, AXIS2_HASH_KEY_STRING); + + if(encoding_header) + { + axis2_msg_ctx_set_transfer_encoding(msg_ctx, env, axutil_strdup(env, AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED)); + } + } request_body = axutil_stream_create_apache2(env, request); if(!request_body) { -- cgit v1.1-32-gdbae