SCIENTIFIC-LINUX-DEVEL Archives

May 2013

SCIENTIFIC-LINUX-DEVEL@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Elias Persson <[log in to unmask]>
Reply To:
Elias Persson <[log in to unmask]>
Date:
Thu, 30 May 2013 14:29:11 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (134 lines)
Seems like a Firefox bug. Should probably be reported to moz.
Content-Encoding says Firefox should decompress once, with the
result being something gzipped (according to Content-Type).

Curl handles it just fine:

> $ curl --compressed -vsS -O 'http://ftp.scientificlinux.org/linux/scientific/6.4/x86_64/os/repodata/comps-sl6-x86_64.xml.gz'
> * About to connect() to ftp.scientificlinux.org port 80 (#0)
> *   Trying 131.225.105.11... connected
> * Connected to ftp.scientificlinux.org (131.225.105.11) port 80 (#0)
> > GET /linux/scientific/6.4/x86_64/os/repodata/comps-sl6-x86_64.xml.gz HTTP/1.1
> > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> > Host: ftp.scientificlinux.org
> > Accept: */*
> > Accept-Encoding: deflate, gzip
> >
> < HTTP/1.1 200 OK
> < Date: Thu, 30 May 2013 12:21:24 GMT
> < Server: Apache
> < Last-Modified: Fri, 22 Mar 2013 18:10:26 GMT
> < ETag: "3fa15b6f-34f9f-4d8875e974880"
> < Accept-Ranges: bytes
> < Vary: Accept-Encoding
> < Content-Encoding: gzip
> < Content-Security-Policy: default-src 'self'; style-src 'self' unsafe-inline;
> < X-Content-Security-Policy: allow 'self'; default-src 'self'; style-src 'self' unsafe-inline;
> < Transfer-Encoding: chunked
> < Content-Type: application/x-gzip
> <
> { [data not shown]
> * Connection #0 to host ftp.scientificlinux.org left intact
> * Closing connection #0
>
> $ file comps-sl6-x86_64.xml.gz
> comps-sl6-x86_64.xml.gz: gzip compressed data, from Unix, max compression
> $ zcat comps-sl6-x86_64.xml.gz | head -n 1
> <?xml version='1.0' encoding='UTF-8'?>


Not compressing already compressed material still makes sense,
even more so if it works as a workaround for bugs elsewhere.


On 2013-05-30 12:13, Ansgar Hockmann-Stolle wrote:
> Maybe an issue with the web server?
>
> Downloading the file with firefox and wget will give different files:
>
> 216856 May 30 11:38 firefox/comps-sl6-x86_64.xml.gz
> 216991 Mar 22 19:10 wget/comps-sl6-x86_64.xml.gz
>
> The Apache is zipping the file on the fly again, but firefox does not
> unzip it right:
>
> firefox/comps-sl6-x86_64.xml:    gzip compressed data, from Unix, max
> compression
> firefox/comps-sl6-x86_64.xml.gz: gzip compressed data, from Unix
> wget/comps-sl6-x86_64.xml:       XML  document text
> wget/comps-sl6-x86_64.xml.gz:    gzip compressed data, from Unix, max
> compression
>
> firefox/comps-sl6-x86_64.xml is the original zipped file!
>
> Sniffing while downloading with firefox:
>
>> GET /linux/scientific/6.4/x86_64/os/repodata/comps-sl6-x86_64.xml.gz
>> HTTP/1.1
>> Host: ftp.scientificlinux.org
>> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:21.0) Gecko/20100101
>> Firefox/21.0
>> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
>> Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
>> Accept-Encoding: gzip, deflate
>> Referer:
>> http://ftp.scientificlinux.org/linux/scientific/6.4/x86_64/os/repodata/
>> Connection: keep-alive
>> Pragma: no-cache
>> Cache-Control: no-cache
>>
>> HTTP/1.1 200 OK
>> Date: Thu, 30 May 2013 09:38:04 GMT
>> Server: Apache
>> Last-Modified: Fri, 22 Mar 2013 18:10:26 GMT
>> ETag: "3fa15b6f-34f9f-4d8875e974880"
>> Accept-Ranges: bytes
>> Vary: Accept-Encoding
>> Content-Encoding: gzip
>> Content-Security-Policy: default-src 'self'; style-src 'self'
>> unsafe-inline;
>> X-Content-Security-Policy: allow 'self'; default-src 'self'; style-src
>> 'self' unsafe-inline;
>> Keep-Alive: timeout=3, max=200
>> Connection: Keep-Alive
>> Transfer-Encoding: chunked
>> Content-Type: application/x-gzip
>>
>> 1faa
> [...]
>
> Sniffing while downloading with wget:
>
>> GET /linux/scientific/6.4/x86_64/os/repodata/comps-sl6-x86_64.xml.gz
>> HTTP/1.1
>> User-Agent: Wget/ (linux-gnu)
>> Accept: */*
>> Host: ftp.scientificlinux.org
>> Connection: Keep-Alive
>>
>> HTTP/1.1 200 OK
>> Date: Thu, 30 May 2013 09:49:27 GMT
>> Server: Apache
>> Last-Modified: Fri, 22 Mar 2013 18:10:26 GMT
>> ETag: "3fa15b6f-34f9f-4d8875e974880"
>> Accept-Ranges: bytes
>> Content-Length: 216991
>> Vary: Accept-Encoding
>> Content-Security-Policy: default-src 'self'; style-src 'self'
>> unsafe-inline;
>> X-Content-Security-Policy: allow 'self'; default-src 'self'; style-src
>> 'self' unsafe-inline;
>> Keep-Alive: timeout=3, max=200
>> Connection: Keep-Alive
>> Content-Type: application/x-gzip
>>
>> ^_213^H^@^@^@^@^@^B^C254Z333s333֙^?357_qV/j247U330vvgvv\v353244333d266323355244
>>
> [...]
>
> I think apache should be configured not to zip already zipped files.
>
> Ciao
>      Ansgar
>

ATOM RSS1 RSS2