]> git.pld-linux.org Git - packages/elinks.git/blobdiff - elinks-gzip-http.patch
- fixed bconds, release 2
[packages/elinks.git] / elinks-gzip-http.patch
index e6ce79cf36c67fb42c7be515b9c1d041bbdf294c..2dc35ed9ee7917ac59c417ba43b08788d424e7d3 100644 (file)
                        kill_buffer_data(rb, l);
                        if (!info->chunk_remaining && rb->len >= 1) {
                                if (rb->data[0] == 10) kill_buffer_data(rb, 1);
-@@ -846,6 +887,14 @@
+@@ -846,6 +887,20 @@
        if (!e->last_modified && (d = parse_http_header(e->head, "Date", NULL)))
                e->last_modified = d;
        if (info->length == -1 || (version < 11 && info->close)) rb->close = 1;
 +      d = parse_http_header(e->head, "Content-Encoding", NULL);
 +      c->gzip = 0;
 +      if (d) {
-+              if (!strcasecmp(d, "gzip") || !strcasecmp(d, "x-gzip")) c->gzip = 1;
-+              mem_free(d);
++              if (!strcasecmp(d, "gzip") || !strcasecmp(d, "x-gzip")) {
++                      mem_free(d);
++                      d = parse_http_header(e->head, "Content-Type", NULL);
++                      if (d) {
++                              if (!strncasecmp(d, "text", 4)) c->gzip = 1;
++                               mem_free(d);
++                      }
++              }
 +      }
 +#endif
        read_http_data(c, rb);
This page took 0.039577 seconds and 4 git commands to generate.