Donatas Ciuksys wrote:
> If your user name is usr, password is passwd, try this form of url:
>
> http://usr:[EMAIL PROTECTED]/blah/blahblah...
>
> Donatas
>
Another alternative is to send an "Authorization:" header that has the
encoded username/password -- this assumes your server is using Basic
authentication, which nearly all of them are. The required encoding is
described in the HTTP specifications (RFC 1945 for HTTP/1.0, RFC 2068
for HTTP/1.1), but it's a pretty simple Base 64 encoding of the username
and password concatenated together.
This exercize will also illustrate how insecure Basic authentication
really is -- anyone with a packet sniffer on your network (or at the
server end, or anywhere in between) can grab the username/password
combination and decode them. It's not encrypted at all.
Craig McClanahan
>
> >As I previously described, I need to capture the output from
> >a servlet from an application using a URL. I kept getting
> >non-helpful error messages....
> >
> >Then if finally occurred to me that this servlet is protected
> >using the "<Location ...>" directive, normally requiring an
> >apache username/password to continue.
> >
> >Does anyone know...is there anyway (short of turning off
> >the protection) how to specify a username/password when
> >accessing a URL?
> >
> >Now I'm really stuck...TIA
>
> -- --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> READ THE FAQ!!!! <http://java.apache.org/faq/>
> Archives and Other: <http://java.apache.org/main/mail.html/>
> Problems?: [EMAIL PROTECTED]
-- --------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
READ THE FAQ!!!! <http://java.apache.org/faq/>
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]