Index: docs/MANUAL
===================================================================
RCS file: /cvsroot/curl/curl/docs/MANUAL,v
retrieving revision 1.41
diff -u -r1.41 MANUAL
--- docs/MANUAL	25 Jan 2009 23:26:30 -0000	1.41
+++ docs/MANUAL	26 Jan 2009 01:23:46 -0000
@@ -141,6 +141,9 @@
 
         curl --noproxy localhost,get.this -x my-proxy:888 http://www.get.this/
 
+ If the proxy is specified with --proxy1.0 instead of --proxy or -x, then
+ curl will use HTTP/1.0 instead of HTTP/1.1 for any CONNECT attempts.
+
  curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.
 
  See also the environment variables Curl support that offer further proxy
Index: docs/curl.1
===================================================================
RCS file: /cvsroot/curl/curl/docs/curl.1,v
retrieving revision 1.263
diff -u -r1.263 curl.1
--- docs/curl.1	25 Jan 2009 23:26:30 -0000	1.263
+++ docs/curl.1	26 Jan 2009 01:23:54 -0000
@@ -903,6 +903,13 @@
 .IP "--proxy-ntlm"
 Tells curl to use HTTP NTLM authentication when communicating with the given
 proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
+.IP "--proxy1.0 <proxyhost[:port]>"
+Use the specified HTTP 1.0 proxy. If the port number is not specified, it is
+assumed at port 1080.
+
+The only difference between this and the HTTP proxy option (\fI-x/--proxy\fP),
+is that attempts to use CONNECT through the proxy will specify an HTTP 1.0
+protocol instead of the default HTTP 1.1.
 .IP "-p/--proxytunnel"
 When an HTTP proxy is used (\fI-x/--proxy\fP), this option will cause non-HTTP
 protocols to attempt to tunnel through the proxy instead of merely using it to
Index: docs/libcurl/curl_easy_setopt.3
===================================================================
RCS file: /cvsroot/curl/curl/docs/libcurl/curl_easy_setopt.3,v
retrieving revision 1.246
diff -u -r1.246 curl_easy_setopt.3
--- docs/libcurl/curl_easy_setopt.3	25 Jan 2009 23:26:30 -0000	1.246
+++ docs/libcurl/curl_easy_setopt.3	26 Jan 2009 01:25:29 -0000
@@ -470,10 +470,10 @@
 specified in the proxy string \fICURLOPT_PROXY\fP.
 .IP CURLOPT_PROXYTYPE
 Pass a long with this option to set type of the proxy. Available options for
-this are \fICURLPROXY_HTTP\fP, \fICURLPROXY_SOCKS4\fP (added in 7.15.2),
-\fICURLPROXY_SOCKS5\fP, \fICURLPROXY_SOCKS4A\fP (added in 7.18.0) and
-\fICURLPROXY_SOCKS5_HOSTNAME\fP (added in 7.18.0). The HTTP type is
-default. (Added in 7.10)
+this are \fICURLPROXY_HTTP\fP, \fICURLPROXY_HTTP_1_0\fP (added in 7.15.4),
+\fICURLPROXY_SOCKS4\fP (added in 7.15.2), \fICURLPROXY_SOCKS5\fP,
+\fICURLPROXY_SOCKS4A\fP (added in 7.18.0) and \fICURLPROXY_SOCKS5_HOSTNAME\fP
+(added in 7.18.0). The HTTP type is default. (Added in 7.10)
 .IP CURLOPT_NOPROXY
 Pass a pointer to a zero terminated string. The should be a comma- separated
 list of hosts which do not use a proxy, if one is specified.  The only
Index: include/curl/curl.h
===================================================================
RCS file: /cvsroot/curl/curl/include/curl/curl.h,v
retrieving revision 1.372
diff -u -r1.372 curl.h
--- include/curl/curl.h	25 Jan 2009 23:26:31 -0000	1.372
+++ include/curl/curl.h	26 Jan 2009 01:25:31 -0000
@@ -459,7 +459,10 @@
                                           void *userptr);
 
 typedef enum {
-  CURLPROXY_HTTP = 0,   /* added in 7.10 */
+  CURLPROXY_HTTP = 0,   /* added in 7.10, new in 7.19.4 default is to use
+                           CONNECT HTTP/1.1 */
+  CURLPROXY_HTTP_1_0 = 1,   /* added in 7.19.4, force to use CONNECT
+                               HTTP/1.0  */
   CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already
                            in 7.10 */
   CURLPROXY_SOCKS5 = 5, /* added in 7.10 */
Index: lib/ftp.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/ftp.c,v
retrieving revision 1.496
diff -u -r1.496 ftp.c
--- lib/ftp.c	21 Jan 2009 04:42:47 -0000	1.496
+++ lib/ftp.c	26 Jan 2009 01:25:35 -0000
@@ -1894,6 +1894,7 @@
     break;
 #endif /* CURL_DISABLE_PROXY */
   case CURLPROXY_HTTP:
+  case CURLPROXY_HTTP_1_0:
     /* do nothing here. handled later. */
     break;
   default:
Index: lib/http.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/http.c,v
retrieving revision 1.410
diff -u -r1.410 http.c
--- lib/http.c	21 Jan 2009 04:42:47 -0000	1.410
+++ lib/http.c	26 Jan 2009 01:25:38 -0000
@@ -1343,6 +1343,7 @@
         char *host=(char *)"";
         const char *proxyconn="";
         const char *useragent="";
+        const char* http = (conn->proxytype == CURLPROXY_HTTP_1_0) ? "HTTP/1.0" : "HTTP/1.1";
 
         if(!checkheaders(data, "Host:")) {
           host = aprintf("Host: %s\r\n", host_port);
@@ -1363,12 +1364,12 @@
         /* BLOCKING */
         result =
           add_bufferf(req_buffer,
-                      "CONNECT %s:%d HTTP/1.0\r\n"
+                      "CONNECT %s:%d %s\r\n"
                       "%s"  /* Host: */
                       "%s"  /* Proxy-Authorization */
                       "%s"  /* User-Agent */
                       "%s", /* Proxy-Connection */
-                      hostname, remote_port,
+                      hostname, remote_port, http,
                       host,
                       conn->allocptr.proxyuserpwd?
                       conn->allocptr.proxyuserpwd:"",
Index: lib/url.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/url.c,v
retrieving revision 1.782
diff -u -r1.782 url.c
--- lib/url.c	25 Jan 2009 23:26:31 -0000	1.782
+++ lib/url.c	26 Jan 2009 01:25:44 -0000
@@ -1433,7 +1433,7 @@
 
   case CURLOPT_PROXYTYPE:
     /*
-     * Set proxy type. HTTP/SOCKS4/SOCKS4a/SOCKS5/SOCKS5_HOSTNAME
+     * Set proxy type. HTTP/HTTP_1_0/SOCKS4/SOCKS4a/SOCKS5/SOCKS5_HOSTNAME
      */
     data->set.proxytype = (curl_proxytype)va_arg(param, long);
     break;
@@ -2820,6 +2820,7 @@
       break;
 #endif /* CURL_DISABLE_PROXY */
     case CURLPROXY_HTTP:
+    case CURLPROXY_HTTP_1_0:
       /* do nothing here. handled later. */
       break;
     default:
@@ -4178,7 +4179,7 @@
   conn->bits.proxy = (bool)(data->set.str[STRING_PROXY] &&
                             *data->set.str[STRING_PROXY]);
   conn->bits.httpproxy = (bool)(conn->bits.proxy
-                                && (conn->proxytype == CURLPROXY_HTTP));
+                                && (conn->proxytype == CURLPROXY_HTTP || conn->proxytype == CURLPROXY_HTTP_1_0));
   conn->bits.proxy_user_passwd = (bool)(NULL != data->set.str[STRING_PROXYUSERNAME]);
   conn->bits.tunnel_proxy = data->set.tunnel_thru_httpproxy;
 
@@ -4278,7 +4279,7 @@
   if(proxy && *proxy) {
     long bits = conn->protocol & (PROT_HTTPS|PROT_SSL|PROT_MISSING);
 
-    if(conn->proxytype == CURLPROXY_HTTP) {
+    if(conn->proxytype == CURLPROXY_HTTP || conn->proxytype == CURLPROXY_HTTP_1_0) {
       /* force this connection's protocol to become HTTP */
       conn->protocol = PROT_HTTP | bits;
       conn->bits.httpproxy = TRUE;
Index: src/main.c
===================================================================
RCS file: /cvsroot/curl/curl/src/main.c,v
retrieving revision 1.503
diff -u -r1.503 main.c
--- src/main.c	25 Jan 2009 23:26:31 -0000	1.503
+++ src/main.c	26 Jan 2009 01:25:50 -0000
@@ -448,6 +448,7 @@
   char *userpwd;
   char *proxyuserpwd;
   char *proxy;
+  int proxyver;     /* set to CURLPROXY_HTTP* define */
   char *noproxy;
   bool proxytunnel;
   bool ftp_append;         /* APPE on ftp */
@@ -787,6 +788,7 @@
     "    --proxy-negotiate Use Negotiate authentication on the proxy (H)",
     "    --proxy-ntlm    Use NTLM authentication on the proxy (H)",
     " -U/--proxy-user <user[:password]> Set proxy user and password",
+    "    --proxy1.0 <host[:port]> Use HTTP/1.0 proxy on given port",
     " -p/--proxytunnel   Operate through a HTTP proxy tunnel (using CONNECT)",
     "    --pubkey <key>  Public key file name (SSH)",
     " -Q/--quote <cmd>   Send command(s) to server before file transfer (F/SFTP)",
@@ -1669,6 +1671,7 @@
     {"$3", "keepalive-time",  TRUE},
     {"$4", "post302",    FALSE},
     {"$5", "noproxy",    TRUE},
+    {"$6", "proxy1.0",   TRUE},
 
     {"0", "http1.0",     FALSE},
     {"1", "tlsv1",       FALSE},
@@ -2182,6 +2185,11 @@
         /* This specifies the noproxy list */
         GetStr(&config->noproxy, nextarg);
         break;
+      case '6': /* --proxy1.0 */
+        /* http 1.0 proxy */
+        GetStr(&config->proxy, nextarg);
+        config->proxyver = CURLPROXY_HTTP_1_0;
+        break;
       }
       break;
     case '#': /* --progress-bar */
@@ -2867,6 +2875,7 @@
     case 'x':
       /* proxy */
       GetStr(&config->proxy, nextarg);
+      config->proxyver = CURLPROXY_HTTP;
       break;
     case 'X':
       /* set custom request */
@@ -4543,6 +4552,8 @@
         my_setopt(curl, CURLOPT_INFILESIZE_LARGE, uploadfilesize);
         my_setopt(curl, CURLOPT_URL, url);     /* what to fetch */
         my_setopt(curl, CURLOPT_PROXY, config->proxy); /* proxy to use */
+        if(config->proxy)
+          my_setopt(curl, CURLOPT_PROXYTYPE, config->proxyver);
         my_setopt(curl, CURLOPT_NOPROGRESS, config->noprogress);
         if(config->no_body) {
           my_setopt(curl, CURLOPT_NOBODY, 1);
