61 lines
2.1 KiB
Plaintext
61 lines
2.1 KiB
Plaintext
From: trashcan at david-steuber.com (David Steuber)
|
|
Date: 10 Apr 1999 19:53:18 -0500
|
|
Subject: Internet Robot
|
|
References: <7ehe9m$hbs$1@nnrp1.dejanews.com> <m3emluaecc.fsf@solo.david-steuber.com> <7emldl$rh9$1@nnrp1.dejanews.com>
|
|
Message-ID: <m3hfqo7zb5.fsf@solo.david-steuber.com>
|
|
Content-Length: 1748
|
|
X-UID: 54
|
|
|
|
gscot at my-dejanews.com writes:
|
|
|
|
-> David Steuber: Thank you for the reply (and Thanks to every one that
|
|
-> replied). It was a big help to read over the rfc 1945 and rfc 2068. It is the
|
|
-> first time that I have every looked at one and they are pretty informative.
|
|
-> I can now POST my request but the server is asking for authentication.
|
|
|
|
Hmm. You are posting to a URL that requires authentication?
|
|
|
|
The way the server requests authentication is by sending down the
|
|
following headers (for basic authentication):
|
|
|
|
401 Unauthorized HTTP/1.0
|
|
WWW-Authenticate: Basic realm="WallyWorld"
|
|
|
|
To deal with that, you have to send up proper credentials. The header
|
|
looks something like this:
|
|
|
|
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
|
|
|
|
Where the last string is a Base64 encoded userid:password.
|
|
|
|
See section 11 in RFC-1945 for details.
|
|
|
|
-> You mentioned that it might be helpful to capture and look at the client's
|
|
-> out put. How do I do that.
|
|
|
|
This can be tricky. Idealy, when talking to the server, you want an
|
|
HTTP client that will show you all the headers. When talking to the
|
|
client, you want the server to display all the headers (or send them
|
|
back to the client). I've always done this the hardway. You can
|
|
actually talk to an HTTP server with telnet if you are desperate
|
|
enough. I don't recomend it because one typo and you have to do the
|
|
request over again.
|
|
|
|
Other people responding mentioned a url package for python. I would
|
|
take a look at that to see just what it can do. It may make the job a
|
|
lot easier.
|
|
|
|
--
|
|
David Steuber
|
|
http://www.david-steuber.com
|
|
|
|
s/trashcan/david/ to reply by mail
|
|
If you don't, I won't see it.
|
|
|
|
"The way to make a small fortune in the commodities market is to start
|
|
with a large fortune."
|
|
|
|
|
|
|
|
|