? include/curl/Makefile
? include/curl/Makefile.in
Index: include/curl/curl.h
===================================================================
RCS file: /cvsroot/curl/curl/include/curl/curl.h,v
retrieving revision 1.88
diff -u -r1.88 curl.h
--- include/curl/curl.h	2001/07/12 01:57:28	1.88
+++ include/curl/curl.h	2001/08/03 11:48:20
@@ -443,6 +443,11 @@
    * parameters will use fwrite() syntax, make sure to follow them. */
   CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79),
 
+  /* Set this to force the HTTP request to get back to GET. Only really usable
+     if POST, PUT or a custom request have been used first.
+   */
+  CINIT(HTTPGET, LONG, 80),
+
   CURLOPT_LASTENTRY /* the last unusued */
 } CURLoption;
 
Index: lib/http.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/http.c,v
retrieving revision 1.63
diff -u -r1.63 http.c
--- lib/http.c	2001/05/31 07:03:04	1.63
+++ lib/http.c	2001/08/03 11:48:45
@@ -361,7 +361,7 @@
   data=conn->data;
   http=conn->proto.http;
 
-  if(data->bits.http_formpost) {
+  if(HTTPREQ_POST_FORM == data->httpreq) {
     *bytecount = http->readbytecount + http->writebytecount;
       
     Curl_FormFree(http->sendit); /* Now free that whole lot */
@@ -369,7 +369,7 @@
     data->fread = http->storefread; /* restore */
     data->in = http->in; /* restore */
   }
-  else if(data->bits.http_put) {
+  else if(HTTPREQ_PUT == data->httpreq) {
     *bytecount = http->readbytecount + http->writebytecount;
   }
 
@@ -405,7 +405,7 @@
 
   if ( (conn->protocol&(PROT_HTTP|PROT_FTP)) &&
        data->bits.upload) {
-    data->bits.http_put=1;
+    data->httpreq = HTTPREQ_PUT;
   }
   
   /* The User-Agent string has been built in url.c already, because it might
@@ -457,7 +457,7 @@
     /* The path sent to the proxy is in fact the entire URL */
     ppath = data->url;
   }
-  if(data->bits.http_formpost) {
+  if(HTTPREQ_POST_FORM == data->httpreq) {
     /* we must build the whole darned post sequence first, so that we have
        a size of the whole shebang before we start to send it */
     http->sendit = Curl_getFormData(data->httppost, &http->postsize);
@@ -488,9 +488,9 @@
   if(!checkheaders(data, "Accept:"))
     http->p_accept = "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r\n";
 
-  if((data->bits.http_post ||
-      data->bits.http_formpost ||
-      data->bits.http_put) &&
+  if(( (HTTPREQ_POST == data->httpreq) ||
+       (HTTPREQ_POST_FORM == data->httpreq) ||
+       (HTTPREQ_PUT == data->httpreq) ) &&
      conn->resume_from) {
     /**********************************************************************
      * Resuming upload in HTTP means that we PUT or POST and that we have
@@ -597,8 +597,9 @@
 
                 data->customrequest?data->customrequest:
                 (data->bits.no_body?"HEAD":
-                 (data->bits.http_post || data->bits.http_formpost)?"POST":
-                 (data->bits.http_put)?"PUT":"GET"),
+                 ((HTTPREQ_POST == data->httpreq) ||
+                  (HTTPREQ_POST_FORM == data->httpreq))?"POST":
+                 (HTTPREQ_PUT == data->httpreq)?"PUT":"GET"),
                 ppath,
                 (conn->bits.proxy_user_passwd &&
                  conn->allocptr.proxyuserpwd)?conn->allocptr.proxyuserpwd:"",
@@ -703,7 +704,7 @@
       headers = headers->next;
     }
 
-    if(data->bits.http_formpost) {
+    if(HTTPREQ_POST_FORM == data->httpreq) {
       if(Curl_FormInit(&http->form, http->sendit)) {
         failf(data, "Internal HTTP POST error!\n");
         return CURLE_HTTP_POST_ERROR;
@@ -734,7 +735,7 @@
         return result;
       }
     }
-    else if(data->bits.http_put) {
+    else if(HTTPREQ_PUT == data->httpreq) {
       /* Let's PUT the data to the server! */
 
       if(data->infilesize>0) {
@@ -762,7 +763,7 @@
       
     }
     else {
-      if(data->bits.http_post) {
+      if(HTTPREQ_POST == data->httpreq) {
         /* this is the simple POST, using x-www-form-urlencoded style */
 
         if(!checkheaders(data, "Content-Length:"))
Index: lib/transfer.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/transfer.c,v
retrieving revision 1.44
diff -u -r1.44 transfer.c
--- lib/transfer.c	2001/08/02 16:52:12	1.44
+++ lib/transfer.c	2001/08/03 11:48:45
@@ -1046,10 +1046,8 @@
         case 303: /* See Other */
           /* Disable both types of POSTs, since doing a second POST when
            * following isn't what anyone would want! */
-          data->bits.http_post = FALSE;
-          data->bits.http_formpost = FALSE;
-          data->httpreq = HTTPREQ_GET; /* enfore GET request */
-          infof(data, "Disables POST\n");
+          data->httpreq = HTTPREQ_GET; /* enforce GET request */
+          infof(data, "Disables POST, goes with GET\n");
           break;
         case 304: /* Not Modified */
           /* 304 means we did a conditional request and it was "Not modified".
Index: lib/url.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/url.c,v
retrieving revision 1.132
diff -u -r1.132 url.c
--- lib/url.c	2001/06/12 09:21:37	1.132
+++ lib/url.c	2001/08/03 11:48:45
@@ -432,10 +432,10 @@
     break;
   case CURLOPT_PUT:
     /*
-     * Use the HTTP PUT request to transfer data.
+     * Use the HTTP PUT request to transfer data if this is TRUE.  If this is
+     * FALSE, don't set the httpreq. We can't know what to revert it to!
      */
-    data->bits.http_put = va_arg(param, long)?TRUE:FALSE;
-    if(data->bits.http_put)
+    if(va_arg(param, long))
       data->httpreq = HTTPREQ_PUT;
     break;
 #if 0
@@ -529,10 +529,18 @@
      * Set to make us do HTTP POST
      */
     data->httppost = va_arg(param, struct HttpPost *);
-    data->bits.http_formpost = data->httppost?1:0;
-    if(data->bits.http_formpost)
+    if(data->httppost)
       data->httpreq = HTTPREQ_POST_FORM;
     break;
+
+  case CURLOPT_HTTPGET:
+    /*
+     * Set to force us do HTTP GET
+     */
+    if(va_arg(param, long))
+      data->httpreq = HTTPREQ_GET;
+    break;
+
   case CURLOPT_INFILE:
     /*
      * FILE pointer to read the file to be uploaded from. Or possibly
@@ -575,8 +583,8 @@
     break;
   case CURLOPT_POST:
     /* Does this option serve a purpose anymore? */
-    data->bits.http_post = va_arg(param, long)?TRUE:FALSE;
-    if(data->bits.http_post)
+
+    if(va_arg(param, long))
       data->httpreq = HTTPREQ_POST;
     break;
   case CURLOPT_POSTFIELDS:
@@ -584,8 +592,7 @@
      * A string with POST data. Makes curl HTTP POST.
      */
     data->postfields = va_arg(param, char *);
-    data->bits.http_post = data->postfields?TRUE:FALSE;
-    if(data->bits.http_post)
+    if(data->postfields)
       data->httpreq = HTTPREQ_POST;
     break;
   case CURLOPT_POSTFIELDSIZE:
Index: lib/urldata.h
===================================================================
RCS file: /cvsroot/curl/curl/lib/urldata.h,v
retrieving revision 1.64
diff -u -r1.64 urldata.h
--- lib/urldata.h	2001/05/31 13:50:28	1.64
+++ lib/urldata.h	2001/08/03 11:48:45
@@ -382,12 +382,6 @@
 /* This struct is for boolean settings that define how to behave during
    this session. */
 struct Configbits {
-  /* these four request types mirror the httpreq field */
-  bool http_formpost;
-  bool http_post;
-  bool http_put;
-  bool http_get;
-
   bool get_filetime;
   bool tunnel_thru_httpproxy;
   bool ftp_append;
