Index: lib/http.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/http.c,v
retrieving revision 1.426
diff -u -p -r1.426 http.c
--- lib/http.c	18 Oct 2009 00:18:27 -0000	1.426
+++ lib/http.c	30 Oct 2009 08:04:01 -0000
@@ -2905,7 +2905,17 @@ CURLcode Curl_http(struct connectdata *c
       if(result)
         return result;
 
-      if(data->set.postfieldsize) {
+      if(data->req.upload_chunky && conn->bits.authneg) {
+        /* Chunky upload is selected and we're negotiating auth still, send
+           end-of-data only */
+        result = add_buffer(req_buffer,
+                            "\x0d\x0a\x30\x0d\x0a\x0d\x0a", 7);
+        /* CR  LF   0  CR  LF  CR  LF */
+        if(result)
+          return result;
+      }
+
+      else if(data->set.postfieldsize) {
         /* set the upload size to the progress meter */
         Curl_pgrsSetUploadSize(data, postsize?postsize:-1);
 
