livecheck gzip compressed html page

Ryan Schmidt ryandesign at macports.org
Fri Mar 26 15:32:42 PDT 2010


$ port livecheck advancescan
Error: cannot check if advancescan was updated (regex didn't match)


The livecheck seems to be set up correctly:

$ grep livecheck $(port file advancescan)
livecheck.type	regex
livecheck.url	http://advancemame.sourceforge.net/scan-download.html
livecheck.regex	${name}-(\\d+(?:\\.\\d+)*)


The problem seems to be that we're receiving gzip-compressed data:

$ curl -O http://advancemame.sourceforge.net/scan-download.html
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2233  100  2233    0     0  28957      0 --:--:-- --:--:-- --:--:--  545k
$ file scan-download.html 
scan-download.html: gzip compressed data, from Unix
$ curl -I http://advancemame.sourceforge.net/scan-download.html
HTTP/1.0 200 OK
Server: nginx/0.7.63
Date: Fri, 26 Mar 2010 21:58:48 GMT
Content-Type: text/html
Last-Modified: Wed, 29 Apr 2009 20:38:49 GMT
ETag: "1a6d-468b79111ac9c"
Cache-Control: max-age=172800
Expires: Sun, 28 Mar 2010 21:58:48 GMT
Content-Encoding: gzip
Age: 1896
Content-Length: 2233
X-Cache: HIT from localhost.localdomain
X-Cache-Lookup: HIT from localhost.localdomain:3128
Via: 1.1 localhost.localdomain:3128 (squid/2.7.STABLE3)
Connection: close


Is this an improperly-set-up server, or a bug or missing feature in MacPorts? I'm guessing the former, since surely a lot of other servers gzip-compress their HTML pages before sending and I haven't seen this problem in MacPorts before, but even if so, perhaps we could work around it (i.e. it's easy to detect that the result is gzip-compressed, and decompress it before trying to analyze it). Comments?




More information about the macports-dev mailing list