QNetworkReply, HTTP file download, and error headers on failure



  • Hey folks, I just need to tap the knowledge base on something here as when it comes to web standards. Web standards drive me crazy and I need to have error checking working.

    For a number of the files I download, I have a system in place to handle automated downloads when things "should" appear. However, I can't always guarantee those files will be there at the same time everyday. Plus via the http properties of this webpage (I would use QFtp for files, however due to various reasons I have to use the http site as it'll trim files in real time for me and save on bandwidth and download times, which is crucial, and it's a third party resource so I can't tell them to fix not giving a valid file size to me for error checking), I cant get a valid file size... it just gives me -1, even though I'm getting valid files to download.

    However, I know I can scan the http headers to evaluate headers via QNetworkReply (or some other mechanism). What do I need to filter out, so I can declare the download not found, and then process the error and requeue the download request for a future time.

    Thanks!

    Cathy.



  • Never mind, I just figured this out. Please close.



  • @Catherine-Olsen
    Maybe you could post your solution here so if others are facing similar problems they can find a way to go? ;)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.