Handler: refresh method renamed into reload (#630)

environments/ppa-mbqj77/deployments/1
François-Xavier Deltombe 11 years ago
parent 2d81231daf
commit 4b844b7e07
  1. 2
      _example/etc/handler-apache.conf
  2. 2
      _example/etc/handler-apache2.4.conf
  3. 2
      _example/etc/handler-apache2.conf
  4. 2
      _example/etc/handler-nginx.conf
  5. 8
      lemonldap-ng-handler/lib/Lemonldap/NG/Handler/SharedConf.pm

@ -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

@ -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

@ -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

@ -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

@ -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" ) );

Loading…
Cancel
Save