libURL issues?
Chipp Walters
chipp at chipp.com
Tue Jan 27 17:38:04 EST 2004
Richard,
I mentioned this at the conference.
libURL thinks it's got the file, but it's not *the* file. Just a small bit
of nodata it thinks is the file. IMO, it has to do with latency. My DAD has
this problem with his ISP: starband.net (bigtime latency).
In all my libURL downloads, I always test to make sure the file I *got* is
greater than some small amount (1000bytes) or else I repeat the download. I
try it pNumTrys times (a customProperty which is user settable).
put the altNumTry of stack "revAltLib" into tNumTrys
put pFilePath & ".1" into tPath
repeat tNumTrys times
put URL pURL into URL ("binfile:"& tPath)
if there is a file tPath then
put true into tSuccessDL
--> CHECK THE SIZE OF A FILE
--> SOMETIMES IT WILL DOWNLOAD A FILE BUT IT WILL BE TOO SMALL
if altFileSize(tPath) > 500 then
blinkLight false
go inv stack "answer Dialog"
set the loc of stack "answer Dialog" to the screenloc
show stack "answer Dialog"
answer information " altPlugin successfully downloaded to:" &cr&
pFilePath
put URL ("binfile:" & tPath) into URL ("binfile:" & pFilePath)
delete file tPath
go inv stack "answer Dialog"
set the loc of stack "answer Dialog" to the screenloc
show stack "answer Dialog"
answer information "Please Quit RunRev and relaunch to see changes."
revert
exit to top
else
--> DELETE THE 'TOO SMALL' FILE
delete file tPath
end if
end if
altDebug "Could not Download Application...Try:" && tNumTrys
end repeat
function altFileSize pPath
if there is a file pPath then
put the defaultFolder into tOldDF
if pPath contains "/" then --need to set the defaultFolder
get matchText(pPath,"(.*\/)",tFolderPath) -- gets the folderpath
get matchText(pPath,".*\/(.*?)$",pPath) -- gets the file name
set the defaultFolder to tFolderPath
end if
put the detailed files into tList
set the defaultFolder to tOldDF
put lineOffset(cr&pPath&",",cr&tList) into tLineNum
return (item 2 of line tLineNum of tList)
else
return "Error: File does not exist: " & pPath
end if
end altFileSize
best,
Chipp
> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com]On Behalf Of Richard
> Gaskin
> Sent: Tuesday, January 27, 2004 12:12 PM
> To: Rev Discussion List
> Subject: libURL issues?
>
>
> Is anyone else seeing issues with the load command in libURL today?
>
> "get url" works, but load almost always initiates, but then the socket
> closes too quickly for the resource to be loaded.
>
> Checking this out in RevNet I find mixed results: the forms stacks
> ("Feedback" and "Add Resource") consistently work well, but most
> others work
> only rarely today. Could the forms work because they're small enough to
> come over in a single packet?
>
> I've not changed RevNet since it was last working, yesterday
> myself and many
> others were using it without difficulty.
>
> Could this be related to the traffic spike caused by the worm?
> Any workarounds?
>
> --
> Richard Gaskin
> Fourth World Media Corporation
> ___________________________________________________________
> Ambassador at FourthWorld.com http://www.FourthWorld.com
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list