Hey all,

Just starting out so hopefully this will be a simple question. I've spent the afternoon trawling the faq/mail archives/google with little luck.

I'm trying to index a site that has restricted access via an auth class(php). If the browser/script/robot/whatever hasn't authenticated and the username and password have been supplied via Basic Authentication (i.e. $_SERVER vars) then authentication is performed using them. Else, if not logged in and the browser/script/robot/whatever is running on the same server a 401 is returned. In Lynx this triggers the browser to send the supplied username and password. Any other situation (i.e. not logged in and not calling from this server) presents the login page. This is what I'm currently getting.

In order to test it I was using "lynx -auth=username:password http://my.domain.com/search/resources.php"; and eventually got that going ok. I was using lynx as I found it easier to get an immeadiate confirmation without having to go filter through the rundig output.

I'm logging some info from the authentication code and when I run the url with lynx -auth= I can see the username in the logs fine.

When running htdig with the authorization attribute set in the htdig.conf file the auth log from the script doesn't display the username from the .conf file.

The .conf file has nqsf1 while the auth log file reports \236�^_

Some stats;
RedHat 7.3
php-4.2.2-mgd_1.4.4
htdig-3.2.0-2.011302
apache-1.3.27-3

One thing I noticed was that when lynx was given the -auth param it would only use it after it received a 401 error so my script had to send the 401 header to tell lynx to send the auth details. Does htdig work in this manner or does it send the username:password with every call by default?

I threw in some extra headers for the debug output and got the following. Values after the :: are the PHP vars that were used in case that helps.
Discarded header line: x-u: <9E>�^_ :: $_SERVER["PHP_AUTH_USER"]
Discarded header line: x-p :: $_SERVER["PHP_AUTH_PW"]
Discarded header line: x-r: 203.56.200.130 :: $_SERVER["REMOTE_ADDR"]
Discarded header line: x-s: 203.56.200.130 :: $_SERVER["SERVER_ADDR"]


The full output from rundig -vvv is available here;
http://www.babel.com.au/gold/d.php/ht.txt

Any assistance would be appreciated.

--
Regards,
Gold
Babel Com Australia
http://www.babel.com.au/



-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
ht://Dig general mailing list: <[EMAIL PROTECTED]>
ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-general

Reply via email to