Saminda Abeyruwan <saminda 'at' opensource.lk> writes:
[...]
> In my servlet, i have access to *HttpServletRequest*
>
> say using following,
>
> HashMap headerMap = new HashMap();
> Enumeration e = request.getAttributeNames();
> while (e.hasMoreElements()) {
> String field = (String) e.nextElement();
> headerMap.put(field, request.getAttribute(field));
> }
>
> i fill the headerMap. If Authorization header is avialable, *headerMap*
> will contain it.
>
> So if httpclient contains an API to extract the username and password
> using authorization header that would be really handy.
HttpClient is a for doing HTTP *client* stuff, not server stuff.
Use org.apache.commons.codec.binary.Base64 for easy base64
decoding, the same library httpclient uses for encoding (and
decoding in the NTLM class actually ;p).
--
Guillaume Cottenceau
Create your personal SMS or WAP Service - visit mobilefriends.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]