On 13/09/13 18:27, Nicolas Rodsevich wrote:
Hi, I was downloading all files from a site using the following command:

wget  -nd -v -r --accept-regex '.*mod.*resource/.*' --header 'Host: 
catedras.info.unlp.edu.ar' --header 'User-Agent: Mozilla/5.0 (X11; Ubuntu; 
Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0' --header 'Accept: 
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' --header 
'Accept-Language: es-ar,es;q=0.7,en-us;q=0.3' --header 'DNT: 1' --header 
'Content-Type: application/x-www-form-urlencoded' --header 'Cookie: 
__utma=135945449.1331125489.1377905747.1378736807.1378776921.6; 
__utmz=135945449.1377905747.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); 
__utmc=135945449; MoodleSession=bp13b0uafi72eu68v29hlrvih5; 
MOODLEID1_=%25D1%25E3%257E%25AE%250C%257D%2519%25A1' 
https://catedras.info.unlp.edu.ar/course/view.php?id=597

Wget downloaded correctly all files, but when a page used the 303 See Other 
directive to send the file, the file wasn't saved with the name of the mirrored 
page, but with the previous one. Don't know if this is a bug, if it's not it 
would be a good proposal to add an option like --save-with-redirect-name or 
something in order to avoid this bad functionality.
Hola Nicolas,

That's done on purpose. Think what would happen if the redirect was to a filename which happen to be executed automatically by your shell/desktop/program... An option to accept the redirected filename already exists: --trust-server-names


Reply via email to