httpSocket error handling


i’ve got a httpSocket with a downloadComplete-Event. I am calling it from a method:

getThumb (ip as string) dim f as FolderItem = SpecialFolder.Desktop.Child("tmp.jpg") Downloader.Get(ip+"/thumb.jpg", f)

although the “tmp.jpg” doesn’t exist on the server, it downloads a tmp.jpg (1kb)

why is that 1kb-image created and how do i handle the 404-error?

Thanks Marco

Open that file with a text editor, it probably will tell you “Error 404” …

yes, if i open that file “tmp.jpg” in an editor its an html file with 404.

ok, but how do i handle this? i thought the error-event does exactly this?

now i just added to the downloadComplete-Event:

if (httpStatus=404) then
file.Delete //to delete the server-response file
MsgBox “error”

Thanks Marco