Re: Using "Content-Disposition" in HTTP download

2006-09-05 Thread dclist
Justin Ezequiel wrote: > [EMAIL PROTECTED] wrote: > > What is the correct way to download a file through HTTP and save it to > > the file name suggested by "Content-Disposition"? > > > > Perhaps something along the lines of the following? Thank you kindly. -- http://mail.python.org/mailman/lis

Re: Using "Content-Disposition" in HTTP download

2006-09-05 Thread Justin Ezequiel
[EMAIL PROTECTED] wrote: > What is the correct way to download a file through HTTP and save it to > the file name suggested by "Content-Disposition"? > Perhaps something along the lines of the following? >>> url = >>> r'http://www.4so9.com/cauca/files/ban-doc/francois/stingray/198%20lb%20stingra

Using "Content-Disposition" in HTTP download

2006-09-04 Thread dclist
What is the correct way to download a file through HTTP and save it to the file name suggested by "Content-Disposition"? I would use urlretrieve but I'm not sure how to obtain the file name through the HTTP headers without downloading the body (e.g. urlopen(url).info()). -- http://mail.python.or