cURL / Mailing Lists / curl-users / Single Mail

curl-users

automatic configuration script ps

From: Edward S. Peschko <esp5_at_pge.com>
Date: Sun, 29 Feb 2004 16:30:56 -0800

(ps,

this is what happens when I manually take one of the proxies out of the
function and use it directly.

It returns a function revealing the Location that the browser is supposed
to use, with a number associated. This number is a time-sensitive
session which the browser then uses.

I can write a perl script around curl that captures this location
and redirects it to another curl command, but I'm stuck as to how
to send a user and password to this redirected statement so it consistently
works. I can enter "http://user:password@...", but this only causes the
authentication to go away, and it doesn't actually send the page.

And if I enter authentication at the wrong *time*, it doesn't accept
the authentication, and fails. Since this is going to be used in a production
setting, this restriction is annoying to say the least. The best thing
would be for curl to support it natively.

So - are there any plans on supporting this tangled mess natively? FWIW,
we run websense, so if this was fixed, it would effect far more people than
just me - websense is a fairly common site to be run by large corporations.)

Ed

trace follows - I've blackened out the things that are proprietary
to pg&e.. ie, I don't want to get in trouble.. ;-)
)

0001: 47 45 54 20 68 74 74 70 3a 2f 2f 77 77 77 2e 73 GET http://www.s
0010: 6c 61 73 68 64 6f 74 2e 6f 72 67 20 48 54 54 50 lashdot.org HTTP
0020: 2f 31 2e 31 0d 0a 55 73 65 72 2d 41 67 65 6e 74 /1.1..User-Agent
0030: 3a 20 63 75 72 6c 2f 37 2e 31 30 2e 34 20 28 73 : curl/7.10.4 (s
0040: 70 61 72 63 2d 73 75 6e 2d 73 6f 6c 61 72 69 73 parc-sun-solaris
0050: 32 2e 38 29 20 6c 69 62 63 75 72 6c 2f 37 2e 31 2.8) libcurl/7.1
0060: 30 2e 34 20 4f 70 65 6e 53 53 4c 2f 30 2e 39 2e 0.4 OpenSSL/0.9.
0070: 37 62 20 7a 6c 69 62 2f 31 2e 31 2e 34 0d 0a 48 7b zlib/1.1.4..H
0080: 6f 73 74 3a 20 77 77 77 2e 73 6c 61 73 68 64 6f ost: www.slashdo
0090: 74 2e 6f 72 67 0d 0a 50 72 61 67 6d 61 3a 20 6e t.org..Pragma: n
00a0: 6f 2d 63 61 63 68 65 0d 0a 41 63 63 65 70 74 3a o-cache..Accept:
00b0: 20 69 6d 61 67 65 2f 67 69 66 2c 20 69 6d 61 67 image/gif, imag
00c0: 65 2f 78 2d 78 62 69 74 6d 61 70 2c 20 69 6d 61 e/x-xbitmap, ima
00d0: 67 65 2f 6a 70 65 67 2c 20 69 6d 61 67 65 2f 70 ge/jpeg, image/p
00e0: 6a 70 65 67 2c 20 2a 2f 2a 0d 0a 0d 0a jpeg, */*....
<= Recv header, 20 bytes (0x14)
0000: 48 54 54 50 2f 31 2e 30 20 33 30 32 20 4d 6f 76 HTTP/1.0 302 Mov
0010: 65 64 0d 0a ed..
<= Recv header, 95 bytes (0x5f)
0000: 4c 6f 63 61 74 69 6f 6e 3a 20 ff ff ff ff ff ff Location: http:/
0010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff /xxxxxxxxxx.xxxx
0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff xxxx.com:xxxxx/x
0030: 67 69 2d 62 69 6e 2f 61 75 74 68 65 6e 74 69 63 xxxxx/xxxxxxxxxx
0040: 61 74 65 2e 63 67 69 3f 77 73 2d 73 65 73 73 69 xxxxxx?xxxxxxxxx
0050: 6f 6e 3d 31 37 36 33 34 38 30 34 37 33 0d 0a x=99999999999...
<= Recv header, 18 bytes (0x12)
0000: 50 72 61 67 6d 61 3a 20 6e 6f 2d 63 61 63 68 65 Pragma: no-cache
0010: 0d 0a ..
<= Recv header, 25 bytes (0x19)
0000: 43 61 63 68 65 2d 43 6f 6e 74 72 6f 6c 3a 20 6e Cache-Control: n
0010: 6f 2d 63 61 63 68 65 0d 0a o-cache..
Received on 2004-03-01