jairainbow
12th February 2008 10:06 UTC
Problem in downloading zip file from internet
Hi all,
I want to download a hibernate zip file from internet so i used NSISdl::download command
NSISdl::download /TIMEOUT=30000 http://sourceforge.net/project/downl...a.zip&99595756 "D:\a\hibernate-3.2.6.ga.zip"
while trying to connect to this site it is failed and throwing exception as
Download Failed: Server did not specify content length.
but i tried with this site and it is working fine
NSISdl::download /TIMEOUT=30000 http://examples.oreilly.com/jenut2/2...n/examples.zip
"d:\a\examples.zip"
Please help me to download hibernate.zip
Thanks,
jai
jairainbow
12th February 2008 10:09 UTC
Re: Problem in downloading zip file from internet
Originally posted by jairainbow
Hi all,
I want to download a hibernate zip file from internet so i used NSISdl::download command
NSISdl::download /TIMEOUT=30000 http://sourceforge.net/project/downl...a.zip&99595756 "D:\a\hibernate-3.2.6.ga.zip"
while trying to connect to this site it is failed and throwing exception as
Download Failed: Server did not specify content length.
but i tried with this site and it is working fine
NSISdl::download /TIMEOUT=30000 http://examples.oreilly.com/jenut2/2...n/examples.zip
"d:\a\examples.zip"
Please help me to download hibernate.zip
Thanks,
jai
http://sourceforge.net/project/downloading.php?Afrow UK
12th February 2008 12:25 UTC
You need to specify a content length as it says:
http://www.php.net/header
Stu
jairainbow
12th February 2008 13:11 UTC
Originally posted by Afrow UK
You need to specify a content length as it says:
http://www.php.net/header
Stu
Thanks for your reply
But i could not understand the php comments
The working url is :
http://examples.oreilly.com/jenut2/2...n/examples.zip(examples.oreilly.com/jenut2/2nd_edition/examples.zip)
The url i am facing problem is:
http://sourceforge.net/project/downl...a.zip&99595756(sourceforge.net/project/downloading.php?group_id=40712&use_mirror=jaist&filename=hibernate-3.2.5.ga.zip&99595756)
Could you clarify me futher how to give the php arguments
Thanks
jai
Afrow UK
12th February 2008 13:50 UTC
You need to use header to specify the content length of the file, e.g.
header('Content-type: application/zip');
header('Content-Disposition: attachment; filename="'.$file_name.'"');
header("Content-length: $file_size");
This isn't an NSIS problem though so you should really ask on a PHP forum.
Stu
Takhir
12th February 2008 14:13 UTC
inetc plug-in supports http 1.1 (chunked reply) and not requires content_length header. But download progress bar will be inactive this case.