Akshay07 Posted February 10, 2010 Share Posted February 10, 2010 (edited) Hi all, I have noticed something which seems to be random, Although I do set the InetGet function to force a reload from the remote site, it is not always doing it. Sometimes, the download stops (and is completed) before the time it should take to complete the full download. To make sure that this statement is correct, I have used a mobile phone forced in 2G mode as a modem and downloaded a 100MB file. This should take ages to complete. But once in a while, after a few minutes, the download stops, the progress bar (autoit home made) shows "download completed" before the bar is "full" and I can see that I do have the 100MB file saved, with the correct file size. Once again, it is very random and it is not easy to reproduce. I am using this: InetGet("http://www.mywebsite.com/100MBfile, "C:\MyFolder\100MBfile", 1, 1) Any idea about what is wrong? My understanding of "Forces a reload from the remote site." is that it should ignore if the file is available in the cache. Thanks Edited February 10, 2010 by Akshay07 Link to comment Share on other sites More sharing options...
Steveiwonder Posted February 10, 2010 Share Posted February 10, 2010 I had a similar issue when using my iphone as modem, i ignored it and figured it was the NAT settings by the ISP or something. They call me MrRegExpMan Link to comment Share on other sites More sharing options...
Akshay07 Posted February 10, 2010 Author Share Posted February 10, 2010 Thanks. But I never see this issue if I do the download manually after clearing the cache. Link to comment Share on other sites More sharing options...
Akshay07 Posted February 12, 2010 Author Share Posted February 12, 2010 (edited) Am I the only having this issue? Here is the script: #include <ProgressConstants.au3> #NoTrayIcon $sFileToDownload = "abcd.zip" $sDownloadPath = "http://MyWebSite/" & $sFileToDownload $totalSize = InetGetSize($sDownloadPath) $hFileDownloaded = InetGet($sDownloadPath, "C:\MyFolder\" & $sFileToDownload, 1, 1) ProgressOn("Download progress", "Downloading " & $sFileToDownload, "0 %") For $i = 0 to $totalSize step 1 $aDownloadInfo = InetGetInfo( $hFileDownloaded) If $aDownloadInfo[2] = True Then ExitLoop $percentDownloaded = Round($aDownloadInfo[0]*100/$totalSize, 2) ProgressSet( $percentDownloaded, $percentDownloaded & " %") sleep(2000) Next ProgressSet(100 , "100%", "Download completed.") sleep(5000) ProgressOff() Exit Edited February 12, 2010 by Akshay07 Link to comment Share on other sites More sharing options...
PartyPooper Posted February 13, 2010 Share Posted February 13, 2010 Might be worth putting in a bug report if you can't find the answer and it still fails to download the file correctly. Link to comment Share on other sites More sharing options...
GEOSoft Posted February 13, 2010 Share Posted February 13, 2010 What happens when you change this line? $hFileDownloaded = InetGet($sDownloadPath, "C:\MyFolder\" & $sFileToDownload, 1, 1) to $hFileDownloaded = InetGet($sDownloadPath, "C:\MyFolder\" & $sFileToDownload, 9, 1) George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Akshay07 Posted February 13, 2010 Author Share Posted February 13, 2010 (edited) Thanks for your answer. As mentioned, this error is not easy to reproduce so I unfortunately cannot just retest this. But isn't the value 8 (+1) for FTP only? My DL is a HTTP DL. Edited February 13, 2010 by Akshay07 Link to comment Share on other sites More sharing options...
Akshay07 Posted February 17, 2010 Author Share Posted February 17, 2010 Might be worth putting in a bug report if you can't find the answer and it still fails to download the file correctly.Up I don't want to fill a bug report yet, unless I am sure that I am not doing anything wrong. Link to comment Share on other sites More sharing options...
PartyPooper Posted February 17, 2010 Share Posted February 17, 2010 Not probs. Just a thought, is it possible that a proxy is interfering with it? Might be worth checking to see if HttpSetProxy (1) command has any effect. Link to comment Share on other sites More sharing options...
Akshay07 Posted March 10, 2010 Author Share Posted March 10, 2010 Not probs. Just a thought, is it possible that a proxy is interfering with it? Might be worth checking to see if HttpSetProxy (1) command has any effect.No proxy is used.How do I open a bug report? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now