Index: lib/transfer.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/transfer.c,v
retrieving revision 1.429
diff -u -r1.429 transfer.c
--- lib/transfer.c	4 May 2009 09:47:02 -0000	1.429
+++ lib/transfer.c	7 May 2009 01:57:27 -0000
@@ -130,14 +130,14 @@
   struct SessionHandle *data = conn->data;
   size_t buffersize = (size_t)bytes;
   int nread;
-  int sending_http_headers = FALSE;
+  bool sending_http_headers = FALSE;
 
   if(data->req.upload_chunky) {
     /* if chunked Transfer-Encoding */
     buffersize -= (8 + 2 + 2);   /* 32bit hex + CRLF + CRLF */
     data->req.upload_fromhere += (8 + 2); /* 32bit hex + CRLF */
   }
-  if((data->state.proto.http)
+  if((conn->protocol&PROT_HTTP)
   && (data->state.proto.http->sending == HTTPSEND_REQUEST)) {
      /* We're sending the HTTP request headers, not the data.
         Remember that so we don't re-translate them into garbage. */
@@ -1460,7 +1460,7 @@
   ssize_t bytes_written;
   CURLcode result;
   ssize_t nread; /* number of bytes read */
-  int sending_http_headers = FALSE;
+  bool sending_http_headers = FALSE;
 
   if((k->bytecount == 0) && (k->writebytecount == 0))
     Curl_pgrsTime(data, TIMER_STARTTRANSFER);
@@ -1496,7 +1496,7 @@
           break;
         }
 
-        if(data->state.proto.http) {
+        if(conn->protocol&PROT_HTTP) {
           if(data->state.proto.http->sending == HTTPSEND_REQUEST) {
             /* We're sending the HTTP request headers, not the data.
                Remember that so we don't change the line endings. */

