I felt so. So using a dirty fix for now by not closing the connection
for 401, something like,

lib/http.c,
@@ -3084,6 +3084,10 @@
                * connection for closure after we've read the entire response.
                */
               if(!k->upload_done) {
+                if(k->httpcode == 401) {
+                  infof(data, "HTTP error before end of send, no stop\n");
+                }
+                else {
                 infof(data, "HTTP error before end of send, stop sending\n");
                 conn->bits.close = TRUE; /* close after this */
                 k->upload_done = TRUE;
@@ -3091,6 +3095,7 @@
                 if(data->state.expect100header)
                   k->exp100 = EXP100_FAILED;
               }
+              }
               break;

             default: /* default label present to avoid compiler warnings */


I guess its a bad way of doing it, but this is what am using and works
fine till now. I would appreciate and welcome any attempt in making
this better..

- Vivek S


On Mon, Jul 14, 2014 at 11:13 PM, Daniel Stenberg <[email protected]> wrote:
>
> I get it. You basically want a new option that tells libcurl to pretend NTLM
> is in use - more or less - so that it maintains the connection with a higher
> precedence than it does now. I can't see that we currently have any option
> that makes libcurl do this...
>
> --
>
>  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to