|
Home > Archive > Web Servers General Talk > April 2005 > connecting to .htaccess password protected sites
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
connecting to .htaccess password protected sites
|
|
| yawnmoth 2005-04-18, 2:55 am |
| I'm trying to make an HTTP request to connect to .htaccess password
protected sites and have a small question. Using Ethereal to see what
browsers do when sending out their requests, I believe I've found out
what the required header is:
Authorization: Basic somerandomstringofcharacters\r\n
Unfortunately, I'm not really sure how to encode the random string of
characters that follows "Authorization: Basic ". Anyone have any
ideas? 
| |
| Michael F Gordon 2005-04-19, 8:02 am |
| "yawnmoth" <terra1024@yahoo.com> writes:
>Authorization: Basic somerandomstringofcharacters\r\n
>Unfortunately, I'm not really sure how to encode the random string of
>characters that follows "Authorization: Basic ". Anyone have any
>ideas? 
It's the string username:password (where username and password are
replaced with whatever credentials you need to access the site)
Base64 encoded. See section 11.1 of RFC 2068 for details.
Michael
--
Quidquid latine dictum sit, altum viditur.
|
|
|
|
|