From 4d53c03b42b82da8ef52561a5044185231579435 Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Fri, 29 Jan 2016 11:09:58 +0000 Subject: [PATCH] Nginx... --- Makefile | 5 +++++ lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Server.pm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5f5f8c308..8b54fccdb 100644 --- a/Makefile +++ b/Makefile @@ -889,6 +889,11 @@ default-diff: @$(DIFF) --ignore-matching-lines='set.*get.*\[2\]' $(SRCMANAGERDIR)/scripts/lmConfigEditor $(LMPREFIX)/bin/lmConfigEditor ||true @$(DIFF) --ignore-matching-lines='giveUpPrivileges' $(SRCMANAGERDIR)/scripts/lemonldap-ng-cli $(LMPREFIX)/bin/lemonldap-ng-cli ||true +test-diff: + for file in `find lemonldap-ng-*/lib -type f`; do \ + $(DIFF) $$file `echo $$file|sed -e s/lib/blib\\\/lib/`; \ + done + tidy: clean find lemon*/ -type f \( -name '*.pm' -or -name '*.pl' -or -name '*.t' \) -print -exec perltidy -b {} \; find lemon*/ -name '*.bak' -delete diff --git a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Server.pm b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Server.pm index bbe5877aa..567b9e0f6 100644 --- a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Server.pm +++ b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Server.pm @@ -21,7 +21,7 @@ sub _run { # Transform 302 responses in 401 since Nginx refuse it if($res->[0] == 302 or $res->[0] == 303) { $res->[0] = 401; - push @{$res->[1]},'X-Location' => $tsv->{portal} + push @{$res->[1]},'X-Location' => $tsv->{portal}->(); } # TODO: transform headers in $res->[1]