Leser: 1
10 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/apache2/user.pwd
Require user foo
Order deny,allow
Deny from all
Allow from localhost
Satisfy any
Allow from 192.168
phonk+2007-10-23 11:28:04--Ich hab schon mal mit LWP etwas probiert, aber ohne Erfolg.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
package test::login; use strict; use Apache::RequestRec (); use LWP; use LWP::UserAgent; my $response = ""; sub handler { my $r = shift; $r->content_type('text/html'); $r->rflush; # send the headers out my $agent = LWP::UserAgent->new; my $request = HTTP::Request->new(GET =>"http://www.test.com/index.jsp"); $request->authorization_basic('user', 'pass'); $response = $agent->request($request); $response->is_success or print STDERR "Fehler: ", $response->message, "\n" and die; $r->print("<meta http-equiv='refresh' content='1;URL=http://www.test.com/index.jsp'>" ); return Apache::OK; } 1;
print $response->content
$response->decoded_content
10 Einträge, 1 Seite |