in what case filename/base would be nil in network download listener (without an error)?

Please consider following network download listener, it’s a typical one

local function picDownloadListener(event)             if (event.response == nil) then         return     end     if ( event.isError ) then         return     elseif ( event.phase == "ended" ) then         local proPicObj  = display.newImage(event.response.filename, event.response.baseDirectory)         print("filename/base, event.response.filename, event.response.baseDirectory)     end end

After calling network.download(), in most cases, the result is fine. However, there is a rare case that these two variables are nil:

event.response.filename

event.response.baseDirectory

If the download fails, shouldn’t event.reponse or event.isError should have caught it? How could these two values are nil (& the file is actually not downloaded) while no error is returned?

Any thought?

Just a thought.

Perhaps there was a problem on the server side and it replied with empty content. Not giving an error. Perhaps corona gives you empty file, dir params if it recieved 0 data for the file.

Just a thought.

Perhaps there was a problem on the server side and it replied with empty content. Not giving an error. Perhaps corona gives you empty file, dir params if it recieved 0 data for the file.