summaryrefslogtreecommitdiffstats
path: root/src/core/transport/http
diff options
context:
space:
mode:
authorGravatar damitha2010-06-28 06:21:51 +0000
committerGravatar damitha2010-06-28 06:21:51 +0000
commitb26bb4d1c81bf982162ad43b5bc7e8b7f240cf1f (patch)
tree041d0f445f62ea558c9372f6712780f547c25bff /src/core/transport/http
parent063692aaaf25bf31850f1331fe218a9bb391f5cc (diff)
downloadaxis2c-b26bb4d1c81bf982162ad43b5bc7e8b7f240cf1f.tar.gz
axis2c-b26bb4d1c81bf982162ad43b5bc7e8b7f240cf1f.tar.bz2
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
Diffstat (limited to 'src/core/transport/http')
-rw-r--r--src/core/transport/http/sender/libcurl/axis2_libcurl.c13
1 files changed, 11 insertions, 2 deletions
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);