cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Re: Through proxy to dial up internet

From: Anzej Lemut <anzej.lemut_at_kiss.uni-lj.si>
Date: Mon, 18 Sep 2000 13:16:11 +0200

Enclosing the username and password in quotes made to difference.
----------------------
I changed then the url-to-get (without the proxy switch and username switch)
to http://194.249.218.67/html/financni_podatki/dnevni/tecajna_lista.asp to
avoid name server.

Now the return error is:
curl: (7) Can't connect to server: 2
----------------------
The headers when using proxy switch look like this:

COMMAND:
GET http://194.249.218.67/html/financni_podatki/dnevni/tecajna_lista.asp
HTTP/
1.0
Proxy-authorization: Basic encodedusernameandpassword
User-Agent: curl/7.1 (win32) libcurl 7.1.1
Host: 194.249.218.67:80
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

RESPONSE:
HTTP/1.1 407 Proxy authentication required Proxy-Authenticate: NTLM
Content-Length: 503 Content-Type: text/html

The curl batch file looked like this:

curl -v -i -o "c:\program files\curl\tecaji.htm" -U "username":"password" -x
server1:80
http://194.249.218.67/html/financni_podatki/dnevni/tecajna_lista.asp

where server1 is the name of my MSproxy server and 80 the port I use.

On Fri, 15 Sep 2000, Daniel Stenberg wrote:

> On Fri, 15 Sep 2000, Anzej Lemut wrote:
>
>> When I use:
>>
>> curl -o "c:\InetPub\wwwroot\Tecaji\tecaji.htm"
>> http://www.bsi.si/html/financni_podatki/dnevni/tecajna_lista.asp
>>
>> in a batch file (and the dial-up line is curently down) I get an: curl:
>> (6) Couldn't resolv host 'www.bsi.si' message.
>
>Curl uses the standard system name resolver functions to get the actual IP
>number for the name you enter. In this case, you want to reach the host
named
>www.bsi.si and when curl tries to resolve its name into an IP address the
>system function returns an error.
>
>This is not curl's fault. Your system can't resolve that name while being
>off-line.
>
>> When I use the same batch file at the time the line is up the requested
>> page gets downloaded!?
>
>Yes, because then curl can get the name information from the name server.
>
>> But when I use:
>> curl -o "c:\InetPub\wwwroot\Tecaji\tecaji.htm" -U username:password -x
>> server1:80
http://www.bsi.si/html/financni_podatki/dnevni/tecajna_lista.asp
>>
>> in the batch file (where server1 is the name of my MSproxy 2.0 server and
>> 80 the port I use) I get an "HTTP Error 407:407 Proxy Authentication
>> Required" message in my destination file. This happens no mather which
>> usermame I use, no mather if I use any username. Whatever I do, if I use
>> the -x server1:80 switch (port 1080 or 8080), I get the 407 error from
>> wherever in the LAN network
>
>This is an entirely different story. This is the proxy requiring
>authorization. This is either a curl bug or bad username+password entered
by
>you.
>
>Could you show me the headers that curl sends in its request and the
headers
>the proxy replies? Edit the sensitive data before posting.
>
>--
> Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
> ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Received on 2000-09-18