3

that is download with the following command, why it fails to download that file?

wget http://download.oracle.com/otn-pub/java/jdk/6u35-b10/jdk-6u35-linux-i586.bin

the following command works, but that AuthParam may not work after a while, why?

wget http://download.oracle.com/otn-pub/java/jdk/6u35-b10/jdk-6u35-linux-i586.bin?AuthParam=1346955572_27e44512fe8ef5cb920c4c329e5f0fd8

how this AuthParam option is implemented? why i cannot download without this parameter? and why i can only get this parameter using explorer?

is rewrite used in the oracle server when deal with wget request?

why the same command not works after an hour, does the value of AuthParam expired?

so how the server check whether the value of AuthParam is expired?

wget http://download.oracle.com/otn-pub/java/jdk/6u35-b10/jdk-6u35-linux-i586.bin?AuthParam=1346955572_27e44512fe8ef5cb920c4c329e5f0fd8
--2012-09-07 03:51:01--  http://download.oracle.com/otn-pub/java/jdk/6u35-b10/jdk-6u35-linux-i586.bin?AuthParam=1346955572_27e44512fe8ef5cb920c4c329e5f0fd8
Resolving download.oracle.com... 23.67.251.50, 23.67.251.57
Connecting to download.oracle.com|23.67.251.50|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2012-09-07 03:51:01 ERROR 403: Forbidden.

@KJ-SRS is that kind of CGI program which is used to judge if AuthParam is right? is that possible to download jdk package purely using wget command, and no need to get that AuthParam in explorer

wget -O jre-6u35-linux-i586.bin http://javadl.sun.com/webapps/download/AutoDL?BundleId=68284 cannot get that jdk:(

wget -O jre-6u35-linux-i586.bin http://javadl.sun.com/webapps/download/AutoDL?BundleId=68284
--2012-09-07 12:27:37--  http://javadl.sun.com/webapps/download/AutoDL?BundleId=68284
Resolving javadl.sun.com... 137.254.16.64
Connecting to javadl.sun.com|137.254.16.64|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://sdlc-esd.sun.com/ESD6/JSCDL/jdk/6u35-b10/jre-6u35-linux-i586.bin?AuthParam=1346992177_356c459806fdabc05df2dc04a480b08a&GroupName=JSC&FilePath=/ESD6/JSCDL/jdk/6u35-b10/jre-6u35-linux-i586.bin&File=jre-6u35-linux-i586.bin&BHost=javadl.sun.com [following]
--2012-09-07 12:27:37--  http://sdlc-esd.sun.com/ESD6/JSCDL/jdk/6u35-b10/jre-6u35-linux-i586.bin?AuthParam=1346992177_356c459806fdabc05df2dc04a480b08a&GroupName=JSC&FilePath=/ESD6/JSCDL/jdk/6u35-b10/jre-6u35-linux-i586.bin&File=jre-6u35-linux-i586.bin&BHost=javadl.sun.com
Resolving sdlc-esd.sun.com... 72.246.31.82, 72.246.31.80
Connecting to sdlc-esd.sun.com|72.246.31.82|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21697122 (21M) [application/x-sdlc]
Saving to: `jre-6u35-linux-i586.bin'

100%[===================================================================================================================>] 21,697,122  16.3M/s   in 1.3s

2012-09-07 12:27:39 (16.3 MB/s) - `jre-6u35-linux-i586.bin' saved [21697122/21697122]
giantforest
  • 239
  • 1
  • 4
  • 15

3 Answers3

3

The AuthParam parameter indicates to Oracle's web server that you agree to the terms of their license.

In fact, if you run the wget without the AuthParam, you will be redirected to a download-fail HTML file. If you open that HTML file, you'll see text along the lines of "In order to download products from Oracle Technology Network you must agree to the OTN license terms."

This may just be some confusion on the part of Oracle's web servers vs. legacy Sun web servers. If you go to http://java.com/en/download/manual_v6.jsp and find the thing you're trying to download (Linux self-extracting binary), you'll see a link to http://javadl.sun.com/webapps/download/AutoDL?BundleId=68284 and if you run wget against that, you'll be able to download your file, albeit with a bunch of junk characters in the filename.

cjc
  • 24,916
  • 3
  • 51
  • 70
  • the same command not works after an hour(details are added above), why? – giantforest Sep 06 '12 at 19:53
  • @hugemeow it's likely that when you click the "I Agree" button, the site creates the AuthParam value and stores it on their server for an hour. That would be why you have to use it to download the file via wget. – KJ-SRS Sep 06 '12 at 20:19
  • @hugemeow The command `wget -O jre-6u35-linux-i586.bin http://javadl.sun.com/webapps/download/AutoDL?BundleId=68284` (i.e., wget using the second URL I mentioned, outputting to a sane filename rather than whatever the redirection comes up with) should work for your purposes. For future Java 6 updates, you can go to the first URL and find the URL for the appropriate version you want. – cjc Sep 06 '12 at 23:07
  • @cjc your command cannot get jdk ... – giantforest Sep 07 '12 at 04:29
  • @hugemeow Ah, I was reading too quickly. OK, then it's likely there's no way to get the JDK without going through their web page and explicitly acknowledging their terms of service (and getting the AuthParam). – cjc Sep 07 '12 at 05:52
2

There is a much cleaner way to do this with a header:

Cookie: oraclelicense=accept-securebackup-cookie;
errordeveloper
  • 233
  • 1
  • 5
-3

parase funcionar, le e dado a aceptar lo de los términos y condiciones, lo mande a descargar a través del vinculo en la pagina usando googlechrome ,luego pause la descargar copie la dirección del vinculo y lo puse a bajar con wget wget -c http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.tar.gz?AuthParam=1398796143_4bdf9e4adc1ad94302b811789dd4b85esta funcionando falta ver si me corta la descarga al cumplirse la hora

[Improved translation]

The following seems to work: I clicked on accept the terms and conditions and started the download using Google Chrome. Then I paused the download, copied the download link and I started the download with wget:

wget-c http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.tar.gz?AuthParam=1398796143_4bdf9e4adc1ad94302b811789dd4b85esta

I still need to see if the download gets cut off after an hour.

Jose B
  • 103
  • 4