Replace .pl (#595)
This commit is contained in:
parent
67712c789c
commit
4ae5c7463c
4
Makefile
4
Makefile
|
@ -692,8 +692,6 @@ install_examples_site:
|
|||
@rm -rf $(REXAMPLESDIR)/portal/skins \
|
||||
$(REXAMPLESDIR)/manager/skins \
|
||||
@rm -rf $$(find $(REXAMPLESDIR) -type d -name .svn)
|
||||
@$(PERL) -i -pe 's#__SESSIONDIR__#$(APACHESESSIONFILEDIR)/#g;' $(REXAMPLESDIR)/portal/*.pl
|
||||
@$(PERL) -i -pe 's#__PSESSIONDIR__#$(APACHEPSESSIONFILEDIR)/#g;' $(REXAMPLESDIR)/portal/*.pl
|
||||
|
||||
install_doc_site:
|
||||
# Offline documentation install
|
||||
|
@ -998,7 +996,7 @@ test-diff:
|
|||
done
|
||||
|
||||
tidy: clean
|
||||
find lemon*/ -type f \( -name '*.pm' -or -name '*.pl' -or -name '*.t' \) -print -exec perltidy -b {} \;
|
||||
find lemon*/ -type f \( -name '*.pm' -or -name '*.pl' -or -name '*.fcgi' -or -name '*.t' \) -print -exec perltidy -b {} \;
|
||||
find lemon*/ -name '*.bak' -delete
|
||||
$(MAKE) json
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
"macros" : {
|
||||
"_whatToTrace" : "$_auth eq 'SAML' ? \"$_user\\@$_idpConfKey\" : \"$_user\""
|
||||
},
|
||||
"mailUrl" : "http://auth.__DNSDOMAIN__/mail.pl",
|
||||
"mailUrl" : "http://auth.__DNSDOMAIN__/resetpwd",
|
||||
"notification" : 1,
|
||||
"notificationStorage" : "File",
|
||||
"notificationStorageOptions" : {
|
||||
|
@ -155,7 +155,7 @@
|
|||
"portalSkin" : "bootstrap",
|
||||
"portalSkinBackground" : "1280px-Cedar_Breaks_National_Monument_partially.jpg",
|
||||
"registerDB" : "Demo",
|
||||
"registerUrl" : "http://auth.__DNSDOMAIN__/register.pl",
|
||||
"registerUrl" : "http://auth.__DNSDOMAIN__/register",
|
||||
"reloadUrls" : {
|
||||
"reload.__DNSDOMAIN__" : "http://reload.__DNSDOMAIN__/reload"
|
||||
},
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
/etc/lemonldap-ng/portal-apache2.conf /etc/apache2/sites-available/portal-apache2.conf
|
||||
/etc/lemonldap-ng/portal-nginx.conf /etc/nginx/sites-available/portal-nginx.conf
|
||||
/usr/share/lemonldap-ng/portal/cdc.pl /var/lib/lemonldap-ng/portal/cdc.pl
|
||||
/usr/share/lemonldap-ng/portal/index.pl /var/lib/lemonldap-ng/portal/index.pl
|
||||
/usr/share/lemonldap-ng/portal/mail.pl /var/lib/lemonldap-ng/portal/mail.pl
|
||||
/usr/share/lemonldap-ng/portal/metadata.pl /var/lib/lemonldap-ng/portal/metadata.pl
|
||||
/usr/share/lemonldap-ng/portal/register.pl /var/lib/lemonldap-ng/portal/register.pl
|
||||
/usr/share/lemonldap-ng/portal/openid-configuration.pl /var/lib/lemonldap-ng/portal/openid-configuration.pl
|
||||
/usr/share/doc/liblemonldap-ng-portal-perl/examples/index_skin.pl /usr/share/doc/liblemonldap-ng-portal-perl/examples/index.pl
|
||||
/usr/share/lemonldap-ng/portal/index.fcgi /var/lib/lemonldap-ng/portal/index.fcgi
|
||||
|
|
|
@ -6,9 +6,7 @@ set -e
|
|||
|
||||
if [ "$1" == "configure" ]
|
||||
then
|
||||
if [ -f /var/lib/lemonldap-ng/portal/index.pl ]; then \
|
||||
diff /var/lib/lemonldap-ng/portal/index.pl \
|
||||
/usr/share/doc/liblemonldap-ng-portal-perl/examples/index_skin.pl && \
|
||||
if [ -l /var/lib/lemonldap-ng/portal/index.pl ]; then
|
||||
rm -rf /var/lib/lemonldap-ng/portal/index.pl
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
; You have to set 'proxy' parameter. Example:
|
||||
;
|
||||
; type = SOAP
|
||||
; proxy = https://auth.example.com/index.pl/config
|
||||
; proxy = https://auth.example.com/config
|
||||
; proxyOptions = { timeout => 5 }
|
||||
; User = lemonldap
|
||||
; Password = mypassword
|
||||
|
@ -141,7 +141,7 @@ localStorageOptions={ \
|
|||
; error(language, code)
|
||||
;Soap = 1
|
||||
; Note that getAttibutes() will be activated but on a different URI
|
||||
; (http://auth.example.com/index.pl/sessions)
|
||||
; (http://auth.example.com/sessions)
|
||||
; You can also restrict attributes and macros exported by getAttributes
|
||||
;exportedAttr = uid mail
|
||||
|
||||
|
@ -198,8 +198,8 @@ localStorageOptions={ \
|
|||
; Use it to be able to notify messages during authentication
|
||||
;notification = 1
|
||||
; Note that the SOAP function newNotification will be activated on
|
||||
; http://auth.example.com/index.pl/notification
|
||||
; If you want to hide this, just protect "/index.pl/notification" in
|
||||
; http://auth.example.com/notification
|
||||
; If you want to hide this, just protect "/index.fcgi/notification" in
|
||||
; your Apache configuration file
|
||||
; XSS protection bypass
|
||||
; By default, the portal refuse redirections that comes from sites not
|
||||
|
|
|
@ -290,7 +290,7 @@ access to Lemonldap::NG Web-SSO sessions via SOAP.
|
|||
__PACKAGE__->init ({
|
||||
globalStorage => 'Lemonldap::NG::Common::Apache::Session::SOAP',
|
||||
globalStorageOptions => {
|
||||
proxy => 'http://auth.example.com/index.pl/sessions',
|
||||
proxy => 'http://auth.example.com/sessions',
|
||||
proxyOptions => {
|
||||
timeout => 5,
|
||||
},
|
||||
|
@ -313,7 +313,7 @@ access to Lemonldap::NG Web-SSO sessions via SOAP.
|
|||
my $portal = new Lemonldap::NG::Portal::SharedConf (
|
||||
globalStorage => 'Lemonldap::NG::Common::Apache::Session::SOAP',
|
||||
globalStorageOptions => {
|
||||
proxy => 'http://auth.example.com/index.pl/sessions',
|
||||
proxy => 'http://auth.example.com/sessions',
|
||||
proxyOptions => {
|
||||
timeout => 5,
|
||||
},
|
||||
|
@ -368,7 +368,7 @@ C<>SOAP::Transport::HTTP::Client::get_basic_credentials>:
|
|||
__PACKAGE__->init ( {
|
||||
globalStorage => 'Lemonldap::NG::Common::Apache::Session::SOAP',
|
||||
globalStorageOptions => {
|
||||
proxy => 'http://auth.example.com/index.pl/sessions',
|
||||
proxy => 'http://auth.example.com/sessions',
|
||||
User => 'http-user',
|
||||
Password => 'pass',
|
||||
},
|
||||
|
@ -390,7 +390,7 @@ set environment variables.
|
|||
__PACKAGE__->init ( {
|
||||
globalStorage => 'Lemonldap::NG::Common::Apache::Session::SOAP',
|
||||
globalStorageOptions => {
|
||||
proxy => 'https://auth.example.com/index.pl/sessions',
|
||||
proxy => 'https://auth.example.com/sessions',
|
||||
},
|
||||
} );
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ BEGIN {
|
|||
# - { Type => "File", dirName => "/path/to/conf/dir/" },
|
||||
# - { Type => "DBI", dbiChain => "DBI:mysql:database=lemonldap-ng;host=1.2.3.4",
|
||||
# dbiUser => "user", dbiPassword => "password" },
|
||||
# - { Type => "SOAP", proxy => "https://auth.example.com/index.pl/config" },
|
||||
# - { Type => "SOAP", proxy => "https://auth.example.com/config" },
|
||||
# - { Type => "LDAP", ldapServer => "ldap://localhost", ldapConfBranch => "ou=conf,ou=applications,dc=example,dc=com",
|
||||
# ldapBindDN => "cn=manager,dc=example,dc=com", ldapBindPassword => "secret"},
|
||||
#
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
Changes
|
||||
example/autoProtectedCGI.pl
|
||||
example/menu.pl
|
||||
example/MyHandlerLog4Perl.pm
|
||||
example/scripts/purgeLocalCache
|
||||
|
|
|
@ -55,7 +55,7 @@ __PACKAGE__->init(
|
|||
# configuration. Example:
|
||||
#globalStorage => 'Lemonldap::NG::Common::Apache::Session::SOAP',
|
||||
#globalStorageOptions => {
|
||||
# proxy => 'http://auth.example.com/index.pl/sessions',
|
||||
# proxy => 'http://auth.example.com/sessions',
|
||||
# proxyOptions => {
|
||||
# timeout => 5,
|
||||
# },
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
my $cgi = new Lemonldap::NG::Handler::CGI( { https => 0, } );
|
||||
|
||||
$cgi->authenticate();
|
||||
|
||||
print $cgi->header;
|
||||
|
||||
unless ( $cgi->authorize ) {
|
||||
print $cgi->start_html('Forbidden');
|
||||
print "You're not authorized to see this page";
|
||||
print $cgi->end_html;
|
||||
}
|
||||
else {
|
||||
print $cgi->start_html('Authorized');
|
||||
print "<h1>Welcome</h1>You're authorized to see this page";
|
||||
print $cgi->end_html;
|
||||
}
|
|
@ -140,7 +140,7 @@ sub zeroConf {
|
|||
}
|
||||
},
|
||||
'registerDB' => 'Demo',
|
||||
'registerUrl' => "http://auth.$domain/register.pl",
|
||||
'registerUrl' => "http://auth.$domain/register",
|
||||
'portal' => "http://auth.$domain/",
|
||||
'notificationStorage' => 'File',
|
||||
'locationRules' => {
|
||||
|
@ -170,7 +170,7 @@ sub zeroConf {
|
|||
'portalSkin' => 'bootstrap',
|
||||
'portalSkinBackground' =>
|
||||
'1280px-Cedar_Breaks_National_Monument_partially.jpg',
|
||||
'mailUrl' => "http://auth.$domain/mail.pl",
|
||||
'mailUrl' => "http://auth.$domain/resetpwd",
|
||||
'localSessionStorage' => 'Cache::FileCache',
|
||||
'localSessionStorageOptions' => {
|
||||
'namespace' => 'lemonldap-ng-sessions',
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
"display": "auto",
|
||||
"logo": "database.png",
|
||||
"name": "Notifications explorer",
|
||||
"uri": "http://manager.example.com/notifications.pl"
|
||||
"uri": "http://manager.example.com/notifications"
|
||||
},
|
||||
"type": "application"
|
||||
},
|
||||
|
@ -52,7 +52,7 @@
|
|||
"display": "auto",
|
||||
"logo": "database.png",
|
||||
"name": "Sessions explorer",
|
||||
"uri": "http://manager.example.com/sessions.pl"
|
||||
"uri": "http://manager.example.com/sessions"
|
||||
},
|
||||
"type": "application"
|
||||
},
|
||||
|
|
|
@ -779,7 +779,7 @@
|
|||
"title": "ns",
|
||||
"type": "keyText"
|
||||
}, {
|
||||
"data": "http://auth.example.com/index.pl/sessions",
|
||||
"data": "http://auth.example.com/sessions",
|
||||
"id": "remoteGlobalStorageOptions/proxy",
|
||||
"title": "proxy",
|
||||
"type": "keyText"
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
"id": "applicationList/0004-cat/0006-app",
|
||||
"data": {
|
||||
"display": "auto",
|
||||
"uri": "http://manager.example.com/notifications.pl",
|
||||
"uri": "http://manager.example.com/notifications",
|
||||
"description": "Explore WebSSO notifications",
|
||||
"logo": "database.png"
|
||||
}
|
||||
|
@ -107,7 +107,7 @@
|
|||
"display": "auto",
|
||||
"description": "Explore WebSSO sessions",
|
||||
"logo": "database.png",
|
||||
"uri": "http://manager.example.com/sessions.pl"
|
||||
"uri": "http://manager.example.com/sessions"
|
||||
},
|
||||
"title": "Sessions explorer",
|
||||
"type": "menuApp",
|
||||
|
@ -908,7 +908,7 @@
|
|||
"title": "ns",
|
||||
"type": "keyText"
|
||||
}, {
|
||||
"data": "http://auth.example.com/index.pl/sessions",
|
||||
"data": "http://auth.example.com/sessions",
|
||||
"id": "remoteGlobalStorageOptions/proxy",
|
||||
"title": "proxy",
|
||||
"type": "keyText"
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
"id": "applicationList/0004-cat/0006-app",
|
||||
"data": {
|
||||
"display": "auto",
|
||||
"uri": "http://manager.example.com/notifications.pl",
|
||||
"uri": "http://manager.example.com/notifications",
|
||||
"description": "Explore WebSSO notifications",
|
||||
"logo": "database.png"
|
||||
}
|
||||
|
@ -117,7 +117,7 @@
|
|||
"display": "auto",
|
||||
"description": "Explore WebSSO sessions",
|
||||
"logo": "database.png",
|
||||
"uri": "http://manager.example.com/sessions.pl"
|
||||
"uri": "http://manager.example.com/sessions"
|
||||
},
|
||||
"title": "Sessions explorer",
|
||||
"type": "menuApp",
|
||||
|
@ -918,7 +918,7 @@
|
|||
"title": "ns",
|
||||
"type": "keyText"
|
||||
}, {
|
||||
"data": "http://auth.example.com/index.pl/sessions",
|
||||
"data": "http://auth.example.com/sessions",
|
||||
"id": "remoteGlobalStorageOptions/proxy",
|
||||
"title": "proxy",
|
||||
"type": "keyText"
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
"id": "applicationList/0004-cat/0006-app",
|
||||
"data": {
|
||||
"display": "auto",
|
||||
"uri": "http://manager.example.com/notifications.pl",
|
||||
"uri": "http://manager.example.com/notifications",
|
||||
"description": "Explore WebSSO notifications",
|
||||
"logo": "database.png"
|
||||
}
|
||||
|
@ -107,7 +107,7 @@
|
|||
"display": "auto",
|
||||
"description": "Explore WebSSO sessions",
|
||||
"logo": "database.png",
|
||||
"uri": "http://manager.example.com/sessions.pl"
|
||||
"uri": "http://manager.example.com/sessions"
|
||||
},
|
||||
"title": "Sessions explorer",
|
||||
"type": "menuApp",
|
||||
|
@ -908,7 +908,7 @@
|
|||
"title": "ns",
|
||||
"type": "keyText"
|
||||
}, {
|
||||
"data": "http://auth.example.com/index.pl/sessions",
|
||||
"data": "http://auth.example.com/sessions",
|
||||
"id": "remoteGlobalStorageOptions/proxy",
|
||||
"title": "proxy",
|
||||
"type": "keyText"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
bower.json
|
||||
Changes
|
||||
eg/index.fcgi
|
||||
example/mail.pl
|
||||
example/soapconfigtest.pl
|
||||
example/soaperrortest.pl
|
||||
example/soaptest.pl
|
||||
|
|
|
@ -1,140 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use Lemonldap::NG::Portal::MailReset;
|
||||
use HTML::Template;
|
||||
use strict;
|
||||
|
||||
# Load portal module
|
||||
my $portal = Lemonldap::NG::Portal::MailReset->new();
|
||||
|
||||
my $skin_dir = $portal->getApacheHtdocsPath() . "/skins";
|
||||
my $portal_url = $portal->{portal};
|
||||
my $portalPath = $portal->{portal};
|
||||
$portalPath =~ s#^https?://[^/]+/?#/#;
|
||||
$portalPath =~ s#[^/]+\.pl$##;
|
||||
|
||||
# Process
|
||||
$portal->process();
|
||||
|
||||
my $skin = $portal->getSkin();
|
||||
|
||||
# Template creation
|
||||
my $template = HTML::Template->new(
|
||||
filename => "$skin_dir/$skin/mail.tpl",
|
||||
die_on_bad_params => 0,
|
||||
cache => 0,
|
||||
filter => [
|
||||
sub { $portal->translate_template(@_) },
|
||||
sub { $portal->session_template(@_) }
|
||||
],
|
||||
);
|
||||
|
||||
$template->param(
|
||||
PORTAL_URL => $portal_url,
|
||||
SKIN_PATH => $portalPath . "skins",
|
||||
SKIN => $skin,
|
||||
SKIN_BG => $portal->{portalSkinBackground},
|
||||
AUTH_ERROR => $portal->error,
|
||||
AUTH_ERROR_TYPE => $portal->error_type,
|
||||
CHOICE_PARAM => $portal->{authChoiceParam},
|
||||
CHOICE_VALUE => $portal->{_authChoice},
|
||||
EXPMAILDATE => $portal->{expMailDate},
|
||||
EXPMAILTIME => $portal->{expMailTime},
|
||||
STARTMAILDATE => $portal->{startMailDate},
|
||||
STARTMAILTIME => $portal->{startMailTime},
|
||||
MAILALREADYSENT => $portal->{mail_already_sent},
|
||||
MAIL => $portal->checkXSSAttack( 'mail', $portal->{mail} ) ? ""
|
||||
: $portal->{mail},
|
||||
MAIL_TOKEN => $portal->checkXSSAttack( 'mail_token', $portal->{mail_token} )
|
||||
? ""
|
||||
: $portal->{mail_token},
|
||||
);
|
||||
|
||||
# Display form the first time
|
||||
if (
|
||||
(
|
||||
$portal->{error} == PE_MAILFORMEMPTY
|
||||
or $portal->{error} == PE_MAILFIRSTACCESS
|
||||
or $portal->{error} == PE_MAILNOTFOUND
|
||||
or $portal->{error} == PE_CAPTCHAERROR
|
||||
or $portal->{error} == PE_CAPTCHAEMPTY
|
||||
)
|
||||
and !$portal->{mail_token}
|
||||
)
|
||||
{
|
||||
$template->param(
|
||||
DISPLAY_FORM => 1,
|
||||
DISPLAY_RESEND_FORM => 0,
|
||||
DISPLAY_CONFIRMMAILSENT => 0,
|
||||
DISPLAY_MAILSENT => 0,
|
||||
DISPLAY_PASSWORD_FORM => 0,
|
||||
);
|
||||
}
|
||||
|
||||
# Display captcha if it's enabled
|
||||
if ( $portal->{captcha_mail_enabled} ) {
|
||||
$template->param(
|
||||
CAPTCHA_IMG => $portal->{captcha_img},
|
||||
CAPTCHA_CODE => $portal->{captcha_code},
|
||||
CAPTCHA_SIZE => $portal->{captcha_size}
|
||||
);
|
||||
}
|
||||
|
||||
# Display mail confirmation resent form
|
||||
if ( $portal->{error} == PE_MAILCONFIRMATION_ALREADY_SENT ) {
|
||||
$template->param(
|
||||
DISPLAY_FORM => 0,
|
||||
DISPLAY_RESEND_FORM => 1,
|
||||
DISPLAY_CONFIRMMAILSENT => 0,
|
||||
DISPLAY_MAILSENT => 0,
|
||||
DISPLAY_PASSWORD_FORM => 0,
|
||||
);
|
||||
}
|
||||
|
||||
# Display confirmation mail sent
|
||||
if ( $portal->{error} == PE_MAILCONFIRMOK ) {
|
||||
$template->param(
|
||||
DISPLAY_FORM => 0,
|
||||
DISPLAY_RESEND_FORM => 0,
|
||||
DISPLAY_CONFIRMMAILSENT => 1,
|
||||
DISPLAY_MAILSENT => 0,
|
||||
DISPLAY_PASSWORD_FORM => 0,
|
||||
);
|
||||
}
|
||||
|
||||
# Display mail sent
|
||||
if ( $portal->{error} == PE_MAILOK ) {
|
||||
$template->param(
|
||||
DISPLAY_FORM => 0,
|
||||
DISPLAY_RESEND_FORM => 0,
|
||||
DISPLAY_CONFIRMMAILSENT => 0,
|
||||
DISPLAY_MAILSENT => 1,
|
||||
DISPLAY_PASSWORD_FORM => 0,
|
||||
);
|
||||
}
|
||||
|
||||
# Display password change form
|
||||
if ( $portal->{mail_token}
|
||||
and $portal->{error} != PE_MAILERROR
|
||||
and $portal->{error} != PE_BADMAILTOKEN
|
||||
and $portal->{error} != PE_MAILOK )
|
||||
{
|
||||
$template->param(
|
||||
DISPLAY_FORM => 0,
|
||||
DISPLAY_RESEND_FORM => 0,
|
||||
DISPLAY_CONFIRMMAILSENT => 0,
|
||||
DISPLAY_MAILSENT => 0,
|
||||
DISPLAY_PASSWORD_FORM => 1,
|
||||
);
|
||||
}
|
||||
|
||||
# Custom template parameters
|
||||
if ( my $customParams = $portal->getCustomTemplateParameters() ) {
|
||||
foreach ( keys %$customParams ) {
|
||||
$template->param( $_, $customParams->{$_} );
|
||||
}
|
||||
}
|
||||
|
||||
print $portal->header('text/html; charset=utf-8');
|
||||
print $template->output;
|
||||
|
|
@ -12,7 +12,7 @@ use Data::Dumper;
|
|||
|
||||
# Service
|
||||
my $soap =
|
||||
SOAP::Lite->new( proxy => 'http://auth.example.com/index.pl/config' );
|
||||
SOAP::Lite->new( proxy => 'http://auth.example.com/config' );
|
||||
$soap->default_ns('urn:Lemonldap/NG/Common/CGI/SOAPService');
|
||||
|
||||
# Call SOAP methods
|
||||
|
|
|
@ -15,7 +15,7 @@ my $session_id = shift @ARGV;
|
|||
|
||||
# Service
|
||||
my $soap =
|
||||
SOAP::Lite->new( proxy => 'http://auth.example.com/index.pl/sessions' );
|
||||
SOAP::Lite->new( proxy => 'http://auth.example.com/sessions' );
|
||||
$soap->default_ns('urn:Lemonldap/NG/Common/CGI/SOAPService');
|
||||
|
||||
# Call some SOAP methods
|
||||
|
|
|
@ -16,7 +16,7 @@ my ( $request, @get, @post, @menu, @cookies, @handler );
|
|||
$request = new HTTP::Request( 'GET', 'http://lemonldap-ng.org/' );
|
||||
$ua->request( $request, \&cb_content );
|
||||
|
||||
$request = new HTTP::Request( 'GET', 'http://127.0.0.1/index_simple.pl' );
|
||||
$request = new HTTP::Request( 'GET', 'http://127.0.0.1/' );
|
||||
$request->header( Host => 'auth.example.com' );
|
||||
for ( my $i = 0 ; $i < NB ; $i++ ) {
|
||||
my $time = time();
|
||||
|
@ -25,7 +25,7 @@ for ( my $i = 0 ; $i < NB ; $i++ ) {
|
|||
push @get, $time2;
|
||||
}
|
||||
|
||||
$request = new HTTP::Request( 'POST', 'http://127.0.0.1/index_simple.pl' );
|
||||
$request = new HTTP::Request( 'POST', 'http://127.0.0.1/' );
|
||||
$request->header( Host => 'auth.example.com' );
|
||||
$request->header( 'Content-Lenght' => '42' );
|
||||
$request->header( 'Content-Type' => 'application/x-www-form-urlencoded' );
|
||||
|
@ -54,7 +54,7 @@ for ( my $i = 0 ; $i < NB ; $i++ ) {
|
|||
}
|
||||
|
||||
for ( my $i = 0 ; $i < NB ; $i++ ) {
|
||||
$request = new HTTP::Request( 'GET', 'http://127.0.0.1/index_simple.pl' );
|
||||
$request = new HTTP::Request( 'GET', 'http://127.0.0.1/' );
|
||||
$request->header( Host => 'auth.example.com' );
|
||||
my $cookie = shift @cookies;
|
||||
$request->header( "Cookie", $cookie );
|
||||
|
@ -62,7 +62,7 @@ for ( my $i = 0 ; $i < NB ; $i++ ) {
|
|||
my $response = $ua->request( $request, \&cb_content );
|
||||
my $time2 = time() - $time;
|
||||
push @menu, $time2;
|
||||
$request = new HTTP::Request( 'GET', 'http://127.0.0.1/index.pl' );
|
||||
$request = new HTTP::Request( 'GET', 'http://127.0.0.1/' );
|
||||
$request->header( Host => 'test.example.com' );
|
||||
$request->header( "Cookie", $cookie );
|
||||
|
||||
|
|
Loading…
Reference in New Issue