« App Store Submission … | Home | Build Time Constants »

Tipp of the day: Download trouble

10 12 10 - 23:44 Sometimes you try to download a file with CURL or a HTTPSocket and you receive an error 403 (forbidden). Often this happens because the webserver does a few checks to make sure you are a real visitor and not a mass download tool.
Typically a webserver will check the referrer in the http request. Often they check for referrers and redirect people without referrer to a start page to avoid deep linking. Second webservers like to check for the user agent and if your user agent shows things like CURL, they may block you. Some servers set cookies to verify you visited a page with ads before you download something. So you may need to carry a cookie for the downloads.
So best you capture the http request from the browser so you see values they pass for referrer, user agent and cookie string. Than you can use those values and build your download like it.

Update: Another thing to check is the accept header in the http request.
No comments

  
Remember personal info?

Emoticons / Textile

Comment moderation is enabled on this site. This means that your comment will not be visible on this site until it has been approved by an editor.



Notify:
Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.

Omegabundle 2014 for Xojo