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
Problem in downloading zip file from internet
6 posts
Re: Problem in downloading zip file from internet
Originally posted by jairainbowhttp://sourceforge.net/project/downloading.php?
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
Originally posted by Afrow UKThanks for your reply
You need to specify a content length as it says:
Stu
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
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
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
inetc plug-in supports http 1.1 (chunked reply) and not requires content_length header. But download progress bar will be inactive this case.