bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] Files downloaded from pages using "303 See Other" named wrong


From: Nicolas Rodsevich
Subject: [Bug-wget] Files downloaded from pages using "303 See Other" named wrongly
Date: Fri, 13 Sep 2013 13:27:07 -0300

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.

Here is the output of a wrongly named file:

--2013-09-13 12:38:03--  
https://catedras.info.unlp.edu.ar/mod/resource/view.php?id=10729
Reutilizando la conexión con catedras.info.unlp.edu.ar:443.
Petición HTTP enviada, esperando respuesta... 303 See Other
Ubicación: 
https://catedras.info.unlp.edu.ar/pluginfile.php/35940/mod_resource/content/1/tp02-topologias-practica-RIP.zip?forcedownload=1
 [siguiente]
--2013-09-13 12:38:03--  
https://catedras.info.unlp.edu.ar/pluginfile.php/35940/mod_resource/content/1/tp02-topologias-practica-RIP.zip?forcedownload=1
Reutilizando la conexión con catedras.info.unlp.edu.ar:443.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 6860 (6,7K) [application/zip]
Grabando a: “view.php?id=10729”

100%[===================================================================================================================================================================================================>]
 6.860       --.-K/s   en 0,02s   

2013-09-13 12:38:03 (367 KB/s) - “view.php?id=10729” guardado [6860/6860]

As shown before, the desirabled name would be tp02-topologias-practica-RIP.zip 
rather than view.php?id=10729


Here is the output of a well named file, download without 303 redirect:

--2013-09-13 12:38:03--  
https://catedras.info.unlp.edu.ar/pluginfile.php/35798/mod_resource/content/2/2.-%20ruteo%20interno_Parte1.pdf
Reutilizando la conexión con catedras.info.unlp.edu.ar:443.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 651897 (637K) [application/pdf]
Grabando a: “2.- ruteo interno_Parte1.pdf”

100%[===================================================================================================================================================================================================>]
 651.897     1,48MB/s   en 0,4s   

2013-09-13 12:38:04 (1,48 MB/s) - “2.- ruteo interno_Parte1.pdf” guardado 
[651897/651897]

                                          

reply via email to

[Prev in Thread] Current Thread [Next in Thread]