--- http.c	Thu Mar 11 20:23:49 2004
+++ ../../curl0310_org/curl-7.11.1-20040310/lib/http.c	Wed Mar 10 03:00:13 2004
@@ -32,7 +32,6 @@
 #include <ctype.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <syslog.h>
 
 #include <errno.h>
 
@@ -1068,7 +1067,6 @@
   char *ptr;
   char *request;
   bool authdone=TRUE; /* if the authentication phase is done */
-  bool post_inc_flag = FALSE;
 
   if(!conn->proto.http) {
     /* Only allocate this struct if we don't already have it! */
@@ -1327,6 +1325,7 @@
       }
     }
   }
+
   {
     /* Use 1.1 unless the use specificly asked for 1.0 */
     const char *httpstring=
@@ -1342,47 +1341,6 @@
     if(!req_buffer)
       return CURLE_OUT_OF_MEMORY;
 
-    syslog(LOG_DEBUG,"CURL CURLAUTH_BASIC: %d\n",CURLAUTH_BASIC);
-    syslog(LOG_DEBUG,"CURL CURLAUTH_DIGEST : %d\n",CURLAUTH_DIGEST );
-    syslog(LOG_DEBUG,"CURL CURLAUTH_NTLM : %d\n",CURLAUTH_NTLM );
-    syslog(LOG_DEBUG,"CURL CURLAUTH_GSSNEGOTIATE : %d\n",CURLAUTH_GSSNEGOTIATE );
-    syslog(LOG_DEBUG,"CURL CURLAUTH_ANY : %d\n",CURLAUTH_ANY );
-    /* AVENTAIL CHANGE */
-    if ((!strncmp(request,"POST",4)))
-    {
-       result =
-      add_bufferf(req_buffer,
-                  "%s " /* GET/HEAD/POST/PUT */
-                  "%s HTTP/%s\r\n" /* path + HTTP version */
-                  "%s" /* range */
-                  "%s" /* user agent */
-                  "%s" /* cookie */
-                  "%s" /* host */
-                  "%s" /* pragma */
-                  "%s" /* accept */
-                  "%s" /* accept-encoding */
-                  "%s" /* referer */
-                  "%s",/* transfer-encoding */
-
-                request,
-                ppath,
-                httpstring,
-                (conn->bits.use_range && conn->allocptr.rangeline)?
-                conn->allocptr.rangeline:"",
-                (data->set.useragent && *data->set.useragent && conn->allocptr.uagent)?
-                conn->allocptr.uagent:"",
-                (conn->allocptr.cookie?conn->allocptr.cookie:""), /* Cookie: <data> */
-                (conn->allocptr.host?conn->allocptr.host:""), /* Host: host */
-                http->p_pragma?http->p_pragma:"",
-                http->p_accept?http->p_accept:"",
-                (data->set.encoding && *data->set.encoding && conn->allocptr.accept_encoding)?
-                conn->allocptr.accept_encoding:"", /* 08/28/02 jhrg */
-                (data->change.referer && conn->allocptr.ref)?conn->allocptr.ref:"" /* Referer: <data> <CRLF> */,
-                te
-                );
-    }
-    else {
-
     /* add the main request stuff */
     result =
       add_bufferf(req_buffer,
@@ -1419,7 +1377,7 @@
                 (data->change.referer && conn->allocptr.ref)?conn->allocptr.ref:"" /* Referer: <data> <CRLF> */,
                 te
                 );
-    } //End off Add Buffer
+
     if(result)
       return result;
 
@@ -1586,69 +1544,22 @@
       break;
 
     case HTTPREQ_PUT: /* Let's PUT the data to the server! */
-    {
-       bool header_load = FALSE;
-       if(!checkheaders(data, "Authorization:") && 
-           conn->allocptr.userpwd && 
-           !strncmp(request,"POST",4)) {
-          syslog(LOG_DEBUG,"XHU Add Authorization:\n");
-        /* if not disabled explicitly we add a Expect: 100-continue
-           to the headers which actually speeds up post operations (as
-           there is one packet coming back from the web server) */
-        add_bufferf(req_buffer,
-                    "%s",conn->allocptr.userpwd);
-      }
-      /* only add Content-Length if not uploading chunked */
-      if((data->state.authwant == CURLAUTH_NONE) ||
-           (data->state.authwant == CURLAUTH_BASIC) ||
-           (strncmp(request,"POST",4)))
-      {
-              header_load = TRUE;
-      } 
-      else
-      {
-           switch(conn->ntlm.state)
-           {
-                case NTLMSTATE_TYPE1:
-                    if(conn->ntlm_post_auth==0)
-                    {
-                       conn->ntlm_post_auth++;
-                    } 
-                    break;
-                case NTLMSTATE_TYPE3:
-                    if(conn->ntlm_post_auth > 0)
-                    {
-                         header_load = TRUE;
-                         conn->ntlm_post_auth = 0;
-                    } 
-                    break;
-                 default:
-		    conn->ntlm_post_auth++;
-                    break;
-           }
-      }
-      	//AVENTAIL Change This if part is for NTLM POST ONLY
+
        if((data->set.infilesize>0) && !conn->bits.upload_chunky)
-       {
-          if(header_load)
-          {
-               syslog(LOG_DEBUG,"XHU Add Content-Length at %d\n",__LINE__);
+        /* only add Content-Length if not uploading chunked */
                add_bufferf(req_buffer,
                     "Content-Length: %" FORMAT_OFF_T "\r\n", /* size */
                     data->set.infilesize );
-          }
-       }
         
        if(!checkheaders(data, "Expect:")) {
         /* if not disabled explicitly we add a Expect: 100-continue
            to the headers which actually speeds up post operations (as
            there is one packet coming back from the web server) */
-          if(header_load)
-          {
              add_bufferf(req_buffer,
                     "Expect: 100-continue\r\n");
+        data->set.expect100header = TRUE;
           }
-      }
+
       add_buffer(req_buffer, "\r\n", 2); /* end of headers */
 
       /* set the upload size to the progress meter */
@@ -1668,7 +1579,7 @@
       if(result)
         return result;
       break;
-    }
+
     case HTTPREQ_POST:
       /* this is the simple POST, using x-www-form-urlencoded style */
 
