Author: qboosh                       Date: Wed Apr 18 13:07:38 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- mostly obsolete, gzip decompression already in sources

---- Files affected:
SOURCES:
   links2-gzip_fallback.patch (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: SOURCES/links2-gzip_fallback.patch
diff -u SOURCES/links2-gzip_fallback.patch:1.3 
SOURCES/links2-gzip_fallback.patch:1.4
--- SOURCES/links2-gzip_fallback.patch:1.3      Wed Feb  2 00:16:37 2005
+++ SOURCES/links2-gzip_fallback.patch  Wed Apr 18 15:07:33 2007
@@ -1,17 +1,5 @@
---- links-0.97/configure.in    Mon May  6 01:07:42 2002
-+++ links-0.97/configure.in.new        Wed Jul  3 10:43:47 2002
-@@ -138,6 +138,9 @@
- fi
- AC_MSG_RESULT($cf_result)
- 
-+AC_CHECK_HEADERS(zlib.h)
-+AC_CHECK_LIB(z, gzdopen)
-+
- AC_CHECK_LIB(dl, dlopen)
- #ifdef HAVE_SSL
- AC_ARG_WITH(ssl, [  --without-ssl           disable SSL support], [if test 
"$withval" = no; then disable_ssl=yes; fi])
---- links-2.1pre16/file.c.orig 2005-01-02 21:17:25.000000000 +0100
-+++ links-2.1pre16/file.c      2005-01-28 22:07:45.392257296 +0100
+--- links-2.1pre28/file.c.orig 2006-11-28 17:23:14.000000000 +0100
++++ links-2.1pre28/file.c      2007-04-18 14:49:21.420434281 +0200
 @@ -235,9 +235,14 @@
                mem_free(name);
                setcstate(c, S_FILE_TYPE); abort_connection(c); return;
@@ -27,67 +15,3 @@
                mem_free(name);
                setcstate(c, -er); abort_connection(c); return;
        }
-@@ -361,6 +366,42 @@
-               add_to_str(&file, &fl, "</pre></body></html>\n");
-               head = stracpy("\r\nContent-Type: text/html\r\n");
-       } else {
-+#ifdef HAVE_ZLIB_H
-+              if (strncmp(name + strlen(name) - 3, ".gz", 3) == 0) {
-+              /* decompression */
-+                      gzFile gh = gzdopen(h, "r");
-+                      fl = 0;
-+                      mem_free(name);
-+                      if (!gh) {
-+                              close(h);
-+                              setcstate(c, S_OUT_OF_MEM); 
abort_connection(c); return;
-+                      }
-+                      if (stt.st_size > MAXINT) {
-+                              gzclose(gh);
-+                              setcstate(c, S_OUT_OF_MEM); abort_connection(c);
-+                              return;
-+                      }
-+                      if (!(file = mem_alloc(stt.st_size + !stt.st_size))) {
-+                              gzclose(gh);
-+                              setcstate(c, S_OUT_OF_MEM); abort_connection(c);
-+                              return;
-+                      }
-+                      while ((r = gzread(gh, file+fl, stt.st_size)) > 0) {
-+                              fl += r;
-+                              file = mem_realloc(file, fl + stt.st_size);
-+                              if (!file) {
-+                                      gzclose(gh);
-+                                      setcstate(c, S_OUT_OF_MEM);
-+                                      abort_connection(c);
-+                                      return;
-+                              }
-+                      }       
-+                      gzclose(gh);
-+                      head = stracpy("");
-+              }
-+              else 
-+#endif
-+              {
-               mem_free(name);
-               /* + !stt.st_size is there because of bug in Linux. Read returns
-                  -EACCES when reading 0 bytes to invalid address */
-@@ -378,6 +419,7 @@
-               close(h);
-               fl = stt.st_size;
-               head = stracpy("");
-+              }
-       }
-       if (get_cache_entry(c->url, &e)) {
-               mem_free(file);
---- links-0.97/links.h Wed Jul  3 10:36:17 2002
-+++ links-0.97/links.h.new     Wed Jul  3 10:44:18 2002
-@@ -97,6 +97,10 @@
- #include <openssl/ssl.h>
- #endif
- 
-+#ifdef HAVE_ZLIB_H
-+#include <zlib.h>
-+#endif
-+
- #include "os_depx.h"
- 
- #include "setup.h"
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/SOURCES/links2-gzip_fallback.patch?r1=1.3&r2=1.4&f=u

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to