TomCho
TomCho

Reputation: 3517

wget returns with 500: Internal error, but browser works

I am trying to download the contents of this link > http://goldsmr2.sci.gsfc.nasa.gov/daac-bin/OTF/HTTP_services.cgi?FILENAME=%2Fdata%2Fs4pa%2FMERRA%2FMAT1NXSLV.5.2.0%2F2014%2F01%2FMERRA300.prod.assim.tavg1_2d_slv_Nx.20140103.hdf&FORMAT=TmV0Q0RGLw&BBOX=-16%2C-44%2C-11%2C-40&LABEL=MERRA300.prod.assim.tavg1_2d_slv_Nx.20140103.SUB.nc&FLAGS=&SHORTNAME=MAT1NXSLV&SERVICE=SUBSET_LATS4D&LAYERS=&VERSION=1.02&VARIABLES=u10m%2Cu50m%2Cv10m%2Cv50m

through wget but I get an internal error 500 instead. It works when I paste the url into firefox. I have tried some options with wget and even using a proxy but nothing seems to work. Help is very much appreciated.

Thank you.

Upvotes: 0

Views: 1896

Answers (1)

Alexander O'Mara
Alexander O'Mara

Reputation: 60577

Certain characters have special meaning when used on the command line. For example, if your URL there are several & characters, which tells the shell to run the command before it, and run the next command without waiting for the first one to finish, basally terminating the URL early, and running several other commands from the rest of the URL.

You can avoid these issues by enclosing the URL in single quotes like this, which will prevent the shell from parsing special characters or variables.

wget 'YOUR_URL_HERE'

Upvotes: 1

Related Questions