]> git.pld-linux.org Git - packages/lighttpd.git/commitdiff
- improved patch
authoraredridel <aredridel@pld-linux.org>
Fri, 20 Jan 2006 16:22:36 +0000 (16:22 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    lighttpd-proxy-fix-redirects.patch -> 1.4

lighttpd-proxy-fix-redirects.patch

index a7d92ac200a4fe74aea4735a1699065495b9b1a5..384622533822cb34bcc16b8afc8e7f1722114df9 100644 (file)
@@ -1,6 +1,6 @@
-diff -ur lighttpd-1.4.8-o/doc/proxy.txt lighttpd-1.4.8/doc/proxy.txt
---- lighttpd-1.4.8-o/doc/proxy.txt     2005-08-10 16:26:16.000000000 -0600
-+++ lighttpd-1.4.8/doc/proxy.txt       2006-01-10 01:55:04.000000000 -0700
+diff -ur lighttpd-1.4.9-a/doc/proxy.txt lighttpd-1.4.9/doc/proxy.txt
+--- lighttpd-1.4.9-a/doc/proxy.txt     2005-08-10 16:26:16.000000000 -0600
++++ lighttpd-1.4.9/doc/proxy.txt       2006-01-17 15:35:53.000000000 -0700
 @@ -67,6 +67,8 @@
    :"host":      is ip of the proxy server
    :"port":      is tcp-port on the "host" used by the proxy
@@ -10,9 +10,9 @@ diff -ur lighttpd-1.4.8-o/doc/proxy.txt lighttpd-1.4.8/doc/proxy.txt
  
    e.g.: ::
    
-diff -ur lighttpd-1.4.8-o/src/array.h lighttpd-1.4.8/src/array.h
---- lighttpd-1.4.8-o/src/array.h       2005-09-23 12:24:18.000000000 -0600
-+++ lighttpd-1.4.8/src/array.h 2006-01-10 00:38:55.000000000 -0700
+diff -ur lighttpd-1.4.9-a/src/array.h lighttpd-1.4.9/src/array.h
+--- lighttpd-1.4.9-a/src/array.h       2005-09-23 12:24:18.000000000 -0600
++++ lighttpd-1.4.9/src/array.h 2006-01-17 15:35:53.000000000 -0700
 @@ -129,6 +129,7 @@
                
        int usage; /* fair-balancing needs the no. of connections active on this host */
@@ -21,9 +21,9 @@ diff -ur lighttpd-1.4.8-o/src/array.h lighttpd-1.4.8/src/array.h
  } data_fastcgi;
  
  data_fastcgi *data_fastcgi_init(void);
-diff -ur lighttpd-1.4.8-o/src/data_fastcgi.c lighttpd-1.4.8/src/data_fastcgi.c
---- lighttpd-1.4.8-o/src/data_fastcgi.c        2005-08-23 08:36:12.000000000 -0600
-+++ lighttpd-1.4.8/src/data_fastcgi.c  2006-01-10 00:38:55.000000000 -0700
+diff -ur lighttpd-1.4.9-a/src/data_fastcgi.c lighttpd-1.4.9/src/data_fastcgi.c
+--- lighttpd-1.4.9-a/src/data_fastcgi.c        2005-08-23 08:36:12.000000000 -0600
++++ lighttpd-1.4.9/src/data_fastcgi.c  2006-01-17 15:35:53.000000000 -0700
 @@ -57,6 +57,7 @@
        ds->host = buffer_init();
        ds->port = 0;
@@ -32,9 +32,9 @@ diff -ur lighttpd-1.4.8-o/src/data_fastcgi.c lighttpd-1.4.8/src/data_fastcgi.c
        
        ds->copy = data_fastcgi_copy;
        ds->free = data_fastcgi_free;
-diff -ur lighttpd-1.4.8-o/src/mod_proxy.c lighttpd-1.4.8/src/mod_proxy.c
---- lighttpd-1.4.8-o/src/mod_proxy.c   2005-11-18 05:29:36.000000000 -0700
-+++ lighttpd-1.4.8/src/mod_proxy.c     2006-01-10 00:58:18.000000000 -0700
+diff -ur lighttpd-1.4.9-a/src/mod_proxy.c lighttpd-1.4.9/src/mod_proxy.c
+--- lighttpd-1.4.9-a/src/mod_proxy.c   2006-01-03 04:02:29.000000000 -0700
++++ lighttpd-1.4.9/src/mod_proxy.c     2006-01-17 15:36:41.000000000 -0700
 @@ -277,6 +277,7 @@
                                                { "host",              NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION },      /* 0 */
                                                { "port",              NULL, T_CONFIG_SHORT, T_CONFIG_SCOPE_CONNECTION },       /* 1 */
@@ -51,7 +51,7 @@ diff -ur lighttpd-1.4.8-o/src/mod_proxy.c lighttpd-1.4.8/src/mod_proxy.c
                                        
                                        if (0 != config_insert_values_internal(srv, da_host->value, pcv)) {
                                                return HANDLER_ERROR;
-@@ -527,7 +529,7 @@
+@@ -532,7 +534,7 @@
  }
  
  
@@ -60,25 +60,27 @@ diff -ur lighttpd-1.4.8-o/src/mod_proxy.c lighttpd-1.4.8/src/mod_proxy.c
        char *s, *ns;
        int http_response_status = -1;
        
-@@ -586,7 +588,17 @@
+@@ -591,7 +593,19 @@
                        break;
                case 8:
                        if (0 == strncasecmp(key, "Location", key_len)) {
 +                              buffer *host;
                                con->parsed_response |= HTTP_LOCATION;
 +
-+                              host = buffer_init();
-+                              buffer_copy_string_len(host, con->request.http_host, strchr(con->request.http_host->ptr, ':') - con->request.http_host->ptr);
++                              if(strchr(con->request.http_host->ptr, ':')) {
++                                      host = buffer_init();
++                                      buffer_copy_string_len(host, con->request.http_host, strchr(con->request.http_host->ptr, ':') - con->request.http_host->ptr);
 +
-+                              if(hctx->host->fix_redirects && strncmp(value, "http://", 7) == 0 && strncasecmp(value + 7, host->ptr, host->used) == 0 && *(value + 7 + host->used) == ':' && atoi(value + 7 + host->used + 1) == hctx->host->port) {
-+                                      value = strchr(value + 7 + host->used, '/');
-+                              }
++                                      if(hctx->host->fix_redirects && strncmp(value, "http://", 7) == 0 && strncasecmp(value + 7, host->ptr, host->used) == 0 && *(value + 7 + host->used) == ':' && atoi(value + 7 + host->used + 1) == hctx->host->port) {
++                                              value = strchr(value + 7 + host->used, '/');
++                                      }
 +
-+                              buffer_free(host);
++                                      buffer_free(host);
++                              }
                        }
                        break;
                case 10:
-@@ -688,7 +700,7 @@
+@@ -693,7 +707,7 @@
                                log_error_write(srv, __FILE__, __LINE__, "sb", "Header:", hctx->response_header);
  #endif
                                /* parse the response header */
@@ -87,3 +89,4 @@ diff -ur lighttpd-1.4.8-o/src/mod_proxy.c lighttpd-1.4.8/src/mod_proxy.c
                                        
                                /* enable chunked-transfer-encoding */
                                if (con->request.http_version == HTTP_VERSION_1_1 &&
+Only in lighttpd-1.4.9/src: mod_proxy.c.orig
This page took 0.170761 seconds and 4 git commands to generate.