Archive: need gzip support for web downloads/INETC


need gzip support for web downloads/INETC
  i need gzip support...

url http://beta.data-cdn.mbamupdates.com/v1/database/rules/version.chk
result in INETC ".‹........+3204Ô34Ò32Ð30..¦“$Ö...."
should be "v2011.12.20.06" (from Firefox)

inetc::get /POPUP "" "http://beta.data-cdn.mbamupdates.com/v1/database/rules/version.chk" "$EXEDIR\version.txt" /END /TIMEOUT 30000 /NOCANCEL
GET/v1/database/rules/version.chk HTTP/1.1

Accept
-Encoding: gzip, deflate
Connection: Close
Content-Length: 0
Host: beta.data-cdn.mbamupdates.com/v1/database/rules/version.chk
User-Agent: mbam


HTTP/1.1 200 OK
Accept-Ranges: bytes
cache-control: max-age=120, public, s-maxage=120
Content-Encoding: gzip
Content-Type: text/plain; charset=UTF-8
Date: Fri, 23 Dec 2011 05:04:58 GMT
expires: Fri, 23 Dec 2011 05:06:58 GMT
Last-Modified: Fri, 23 Dec 2011 05:01:52 GMT
Server: ECAcc (fra/D4B8)
>X-Cache: HIT
Content-Length: 34
Connection: close

>.‹........+3204Ô34Ò32Ð30..¦“$Ö....

http://nsis.sourceforge.net/UnTGZ_plug-in (or 7za.exe)


i tried untgz (as well as nsisunz|nsiszip|nsis7z) - but i got always the message "Error: Failure reading from tarball".

untgz::extract -j -zauto "$EXEDIR\version.gz"
i download the file as "version.gz" but also "version.tar.gz" - dont fit.

7za is not really a option, i found gzip.exe (90kb, 7za=574kb).
unzip.exe and pkunzip also failed (unrar|rar too).
but the major problem with those extensions in EXEDIR is that they cannot be deleted cause
anyhow locked up. that why i wanted an internal invisible solution, pity.
# ok $PLUGINSDIR can do, solved that part

another idea was to outsource the download complete with wget but that would cause
another thread for a firewall, not my file.

/me=dumb - i had the inetc thread open and somehow pushed wrong submit button

Try disabling the encoding by using /HEADER "Accept-Encoding: none" in your INETC command. This should tell the server not to use content encoding as the client doesn't support it.

inetc::get /POPUP "" /HEADER "Accept-Encoding: none" "http://beta.data-cdn.mbamupdates.com/v1/database/rules/version.chk" "$EXEDIR\version.txt" /END /TIMEOUT 30000 /NOCANCEL
PaR

afraid it does not work
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

i had
"Accept-Encoding:"
"Accept-Encoding: identity"
"Accept-Encoding: deflate"
"Accept-Encoding: gzip;q=0"

:,|


You are right. I got the encoding response headers and request headers mixed up.

What I don't get is why in your case inetc even sends the Accept-Encoding header. It shouldn't use the encoding unless it's told to do so: http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx