From b26bb4d1c81bf982162ad43b5bc7e8b7f240cf1f Mon Sep 17 00:00:00 2001 From: damitha Date: Mon, 28 Jun 2010 06:21:51 +0000 Subject: Applying patch in AXIS2C-1372 git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@958471 13f79535-47bb-0310-9956-ffa450edef68 --- src/core/transport/http/sender/libcurl/axis2_libcurl.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/core/transport/http') diff --git a/src/core/transport/http/sender/libcurl/axis2_libcurl.c b/src/core/transport/http/sender/libcurl/axis2_libcurl.c index 834e69b..5d68f17 100644 --- a/src/core/transport/http/sender/libcurl/axis2_libcurl.c +++ b/src/core/transport/http/sender/libcurl/axis2_libcurl.c @@ -441,12 +441,21 @@ axis2_libcurl_send( else buffer_size = output_stream_size; { - char tmp_buf[10]; + /* + * Curl calculates the content-length automatically. + * This commented section is not only unnecessary, + * it interferes with authentication. + * + * NTLM, for example, will send an empty request + * first (no body) to get the auth challenge + * before resending with actual content. + */ + /*char tmp_buf[10]; sprintf(tmp_buf, "%d", buffer_size); tmp_strcat = axutil_stracat(env, content_len, tmp_buf); headers = curl_slist_append(headers, tmp_strcat); AXIS2_FREE(env->allocator, tmp_strcat); - tmp_strcat = NULL; + tmp_strcat = NULL;*/ tmp_strcat = axutil_stracat(env, content, content_type); headers = curl_slist_append(headers, tmp_strcat); -- cgit v1.1-32-gdbae