

Conceptually, it's like a key-value store: proxy = result My best guess is that an HTTP proxy works with wget if the target URL is the final URL, so the proxy would cache it in its storage.

You will have the full package downloaded correctly. Wget -continue -no-check-certificate -O jdk-8u181-linux-圆4.tar.gz -header "Cookie: oraclelicense=a" If you remove the http_proxy environment variable and run: But if you open the received ".tar.gz", you'll see it's merely an HTML page that contains error information. There is a line saying "Proxy request sent, awaiting response. If you run the last command, the download of the jdk-8u181-linux-圆4.tar.gz is finished instantly. The Cookie: oraclelicense=a is to indicate the user has accepted the license.Those machines that failed had apt-cacher-ng installed before I tried to install jdk-8u181. Run http_proxy=" wget -continue -no-check-certificate -O jdk-8u181-linux-圆4.tar.gz -header "Cookie: oraclelicense=a".apt-cacher-ng uses localhost:3142 by default to cache the packages. You don't have to configure anything in the APT configuration to reproduce this problem.

Install apt-cacher-ng: sudo apt-get install apt-cacher-ng.So I can reproduce the issue with the steps below: Under the hood, the oracle-java8-installer uses wget to download the jdk-8u181 package. I'll provide more details below, but basically my questions are: Why does the use of http_proxy cause the problem? I believe it's must be related to how an HTTP proxy works, but since I have little experience in that, could someone tell me what knowledge I should learn to understand this issue? After some debugging, I realized it was caused by the HTTP proxy setting. Some of them could succeed but others failed. I'm trying to use WebUpd8 team's oracle-java8-installer to install Java 8 on my Ubuntu 14.04 computers.
