cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Using curl lib for files download

From: Sergei Trofimov <sergei.trofimov_at_gmail.com>
Date: Wed, 31 Dec 2008 12:31:47 +0300

Hi Jeff,

Thanks for u help.

>> GET http://site.company.com/test.exe HTTP/1.1
>
>> 404 Not Found
>> Server at registrationcenter.intel.com
>
>> Why I got "file not found" error if URL is valid?
>
>
> I don't know how you can request a file from "site.company.com"
> and get a response from "registrationcenter.intel.com" but I
> assume you are just using "site.company.com" as an example?
>

Yes, u right, I just replace real URLs with fake ones.

>
> At any rate, a few things to try:
>
> Set CURLOPT_USERAGENT to look like a Firefox or IE user-agent
> string, some servers don't like to talk to other clients.
>
> Set CURLOPT_REFERER to the URL of the page you clicked on in
> your browser, some servers don't like "off-site" requests.
>
> Install the "Live HTTP Headers" extension for Firefox, and try
> downloading the file again, to see if there are any cookies or
> other "special" things sent along with the request:
> https://addons.mozilla.org/en-US/firefox/addon/3829
>

It seems that I have 2 issues here.
ISSUE 1: something wrong with autoproxy. If I use autoproxy which I
have in my work env - I can't download any files using libcurl. And if
I trying to download html page (specify "http://kernel.org/" for
CURLOPT_URL for ex) I got a autoporxy script (at least it looks like
it) instead of this page:
function FindProxyForURL(url,host) {
var me=myIpAddress();
if (!isResolvable(host)) { SKIPPED }
SKIPPED
}
But if I specify just proxy (which is something like "not recommended"
in my work env) - htmls and files downloads ok.
Do libcurl understand autoproxy or problem is how autoproxy configured
in my env?

ISSUE 2: Even with proper proxy I can't download files from
registrationcenter.intel.com. Probably issue is how this server
configured but I want to be sure.
Log of "Live HTTP Headers" attached. I'm not very familiar with web
yet so I don't see any "special" things. Only redirection to some
google site looks strange for me. Can u tell me please on what I
should pay attention?

thanks a lot

-- 
--Sergei

Received on 2008-12-31