TransWikia.com

URLDownload(and URLSave, Import) "Error while processing content unencoding"

Mathematica Asked by bcegkmqs23 on December 26, 2020

I’m downloading a file of exactly 1000K-size (https://gitee.com/WolframPaclet1/WolframPacletExtreme1/raw/master/Paclets/MXNetResources-WIN64-12.0.37.paclet.601) with URLDownload(URLSave, URLRead, Import will produce the same situation). But one or two of the following messages:

URLRead::invhttp: Error while processing content unencoding: invalid code lengths set.
URLRead::invhttp: Error while processing content unencoding: invalid distance too far back.
URLRead::invhttp: Error while processing content unencoding: invalid stored block lengths.
URLRead::invhttp: Error while processing content unencoding: invalid block type.

will be generated.

Download it with Chrome will be ok. The file downloaded with URLDownload is about 1020000 bytes. The previous 1020000 bytes is identical with the one downloaded by Chrome.

Perhaps URLDownload is out-date from some protocol?


"HTTP/1.1 200 OK

date: Tue, 31 Mar 2020 05:26:02 GMT

content-type: text/plain

transfer-encoding: chunked

connection: keep-alive

keep-alive: timeout=60

server: nginx

x-xss-protection: 1; mode=block

x-content-type-options: nosniff

x-ua-compatible: chrome=1

expires: Sun, 1 Jan 2000 01:00:00 GMT

pragma: must-revalidate, no-cache, private

etag: W/"81a7a3370ebada47949a3e644518da29"

content-disposition: inline; filename="MXNetResources-WIN64-12.0.37.paclet.601"

content-transfer-encoding: binary

cache-control: no-cache

set-cookie: oschina_new_user=false; path=/; expires=Sat, 31 Mar 2040 05:26:02 -0000

x-request-id: ee128f06-9ea5-4daa-b9e7-2ec2af51ed7d

x-runtime: 0.107804

content-encoding: gzip"
```

One Answer

This problem can still be reproduced on my Windows. But I've got a solution which is somehow magic.

<<CURLLink`

Evaluate this, and then this problem will disappear for once.

Answered by bcegkmqs23 on December 26, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP