]> git.pld-linux.org Git - packages/dillo.git/commitdiff
- now it works
authormisi3k <misi3k@pld-linux.org>
Sun, 4 May 2003 11:41:48 +0000 (11:41 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dillo-gzip_fallback.patch -> 1.3

dillo-gzip_fallback.patch

index 0dd88113a799d2d731d4f8a2372c6d63b152b6f7..9af846880e0270fb58f1b7a4d03f4afaaee4871c 100644 (file)
@@ -1,5 +1,5 @@
 --- dillo-0.7.2/src/IO/file.c.orig     Sun May  4 12:33:54 2003
-+++ dillo-0.7.2/src/IO/file.c  Sun May  4 12:40:09 2003
++++ dillo-0.7.2/src/IO/file.c  Sun May  4 12:57:50 2003
 @@ -29,6 +29,7 @@
  #include <stdio.h>
  #include <signal.h>
@@ -8,7 +8,12 @@
  
  #include <errno.h>           /* for errno */
  #include "Url.h"
-@@ -66,7 +67,7 @@
+@@ -62,11 +63,12 @@
+    gint FD;         /* Our local-file descriptor */
+    char *FileName;
+    glong FileSize;
++   gint ContentEncoding; /* 0 normal, 1 gzipped */
     pthread_t th1;      /* This transfer's thread id. */
  } DilloFile;
  
  
  /*
   * Local data
-@@ -122,15 +123,27 @@
+@@ -120,17 +122,28 @@
+ {
+    gint fds[2], fd;
     struct stat sb;
++   gint ContentEncoding; /* 0 normal, 1 gzipped */
     DilloFile *Dfile;
  
 -   if ( (fd = open(filename, O_RDONLY)) < 0 || pipe(fds) )
 -   Dfile->FileSize = fstat(fd, &sb) ? -1 : (glong) sb.st_size;
 +   if (ContentEncoding == GZIP_ENCODING) {
 +      gchar *tmp_filename = g_strndup(filename, strlen(filename) - 3);
-+      Dfile->ContentType = File_content_type(tmp_filename);
 +      g_free(tmp_filename);
 +      Dfile->FileSize = -1;
 +   }
 +   else {
-+      Dfile->ContentType = File_content_type(filename);
 +      Dfile->FileSize = fstat(fd, &sb) ? -1 : (glong) sb.st_size;
 +   }
 +   Dfile->ContentEncoding = ContentEncoding;
This page took 0.11219 seconds and 4 git commands to generate.