Repair logout_app (#1044)

environments/ppa-mbqj77/deployments/1
Xavier Guimard 8 years ago
parent e3208fec4f
commit 86844eab0c
  1. 1
      e2e-tests/manager/40-sessions.js
  2. 8
      lemonldap-ng-handler/lib/Lemonldap/NG/Handler/ApacheMP2/Main.pm
  3. 17
      lemonldap-ng-handler/lib/Lemonldap/NG/Handler/ApacheMP2/Request.pm
  4. 2
      lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Reload.pm

@ -36,6 +36,7 @@ describe('Lemonldap::NG Session explorer', function() {
});
it('Should display my IP address', function() {
element(by.id('navsso')).click();
element(by.id('a-ip')).click();
var t = element.all(by.repeater('node in data track by node.id'));
expect(t.count()).toBeGreaterThan(0);

@ -137,10 +137,6 @@ sub print {
$request->env->{'psgi.r'}->print($data);
}
1;
__END__
## @rmethod protected int redirectFilter(string url, Apache2::Filter f)
# Launch the current HTTP request then redirects the user to $url.
# Used by logout_app and logout_app_sso targets
@ -168,6 +164,10 @@ sub redirectFilter {
return $class->OK;
}
1;
__END__
## @method void addToHtmlHead(string data)
# add data at end of html head
# @param data Text to add in html head

@ -12,9 +12,8 @@ sub new {
# $r->subprocess_env breaks header modification. That's why it is not used
# here
my $uri = $r->uri;
$uri =~ s#//+#/#g;
$uri =~ s#\?#%3F#g;
my ( $uri, $args ) = ( $r->uri, $r->args );
my $uri_full = $uri . ( $args ? "?$args" : '' );
my $env = {
#%ENV,
@ -23,12 +22,12 @@ sub new {
$r->connection->can('remote_ip') ? $r->connection->remote_ip
: $r->connection->client_ip
),
QUERY_STRING => $r->args,
REQUEST_URI => $uri . ( $r->args ? '?' . $r->args : '' ),
PATH_INFO => '',
SERVER_PORT => $r->get_server_port,
REQUEST_METHOD => $r->method,
'psgi.version' => [ 1, 1 ],
QUERY_STRING => $args,
REQUEST_URI => $uri_full,
PATH_INFO => '',
SERVER_PORT => $r->get_server_port,
REQUEST_METHOD => $r->method,
'psgi.version' => [ 1, 1 ],
'psgi.url_scheme' => ( $ENV{HTTPS} || 'off' ) =~ /^(?:on|1)$/i
? 'https'
: 'http',

@ -462,7 +462,7 @@ sub conditionSub {
eval 'use Apache2::Filter' unless ( $INC{"Apache2/Filter.pm"} );
return (
sub {
$_[0]->add_output_filter(
$_[0]->{env}->{'psgi.r'}->add_output_filter(
sub {
return $class->redirectFilter( $u, @_ );
}

Loading…
Cancel
Save