Handler: refresh method renamed into reload (#630)

This commit is contained in:
François-Xavier Deltombe 2014-06-19 17:04:02 +00:00
parent 2d81231daf
commit 4b844b7e07
5 changed files with 8 additions and 8 deletions

View File

@ -23,7 +23,7 @@ ErrorDocument 503 http://auth.__DNSDOMAIN__/?lmError=503
Order deny,allow
Deny from all
Allow from 127.0.0.0/8
PerlHeaderParserHandler Lemonldap::NG::Handler->refresh
PerlHeaderParserHandler Lemonldap::NG::Handler->reload
</Location>
# Uncomment this to activate status module

View File

@ -22,7 +22,7 @@ ErrorDocument 503 http://auth.__DNSDOMAIN__/?lmError=503
# configuration change
<Location /reload>
Require ip 127
PerlHeaderParserHandler Lemonldap::NG::Handler->refresh
PerlHeaderParserHandler Lemonldap::NG::Handler->reload
</Location>
# Uncomment this to activate status module

View File

@ -24,7 +24,7 @@ ErrorDocument 503 http://auth.__DNSDOMAIN__/?lmError=503
Order deny,allow
Deny from all
Allow from 127.0.0.0/8
PerlHeaderParserHandler Lemonldap::NG::Handler->refresh
PerlHeaderParserHandler Lemonldap::NG::Handler->reload
</Location>
# Uncomment this to activate status module

View File

@ -19,7 +19,7 @@ server {
location /reload {
allow 127.0.0.0/8;
deny all;
perl Lemonldap::NG::Handler::refresh;
perl Lemonldap::NG::Handler::reload;
}
# Uncomment this to activate status module

View File

@ -204,18 +204,18 @@ sub setConf {
# RELOAD SYSTEM
*reload = *refresh;
*refresh = *reload;
## @rmethod int refresh(Apache::RequestRec r)
## @rmethod int reload(Apache::RequestRec r)
# Launch testConf() with $local=0, so remote configuration is tested.
# Then build a simple HTTP response that just returns "200 OK" or
# "500 Server Error".
# @param $r current request
# @return Apache constant (OK or SERVER_ERROR)
sub refresh($$) {
sub reload($$) {
my ( $class, $r ) = splice @_;
Lemonldap::NG::Handler::Main::Logger->lmLog(
"Request for configuration refresh", 'notice' );
"Request for configuration reload", 'notice' );
if ( $class->testConf(0) == OK ) {
Lemonldap::NG::Handler::API->set_header_out($r,
( "Content-Type" => "text/plain; charset=UTF-8" ) );