You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-commits@axis.apache.org by da...@apache.org on 2010/06/28 08:21:51 UTC

svn commit: r958471 - /axis/axis2/c/core/trunk/src/core/transport/http/sender/libcurl/axis2_libcurl.c

Author: damitha
Date: Mon Jun 28 06:21:51 2010
New Revision: 958471

URL: http://svn.apache.org/viewvc?rev=958471&view=rev
Log:
Applying patch in AXIS2C-1372

Modified:
    axis/axis2/c/core/trunk/src/core/transport/http/sender/libcurl/axis2_libcurl.c

Modified: axis/axis2/c/core/trunk/src/core/transport/http/sender/libcurl/axis2_libcurl.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/src/core/transport/http/sender/libcurl/axis2_libcurl.c?rev=958471&r1=958470&r2=958471&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/src/core/transport/http/sender/libcurl/axis2_libcurl.c (original)
+++ axis/axis2/c/core/trunk/src/core/transport/http/sender/libcurl/axis2_libcurl.c Mon Jun 28 06:21:51 2010
@@ -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);