From 857d421b1e5b775e88a9053e1ef3dc6051427b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Oudot?= Date: Tue, 23 Mar 2010 15:26:33 +0000 Subject: [PATCH] Handler: correct Proxy bugs --- .../lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Proxy.pm | 7 +++---- .../lib/Lemonldap/NG/Handler/Simple.pm | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Proxy.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Proxy.pm index a741f5ca6..a0834ceb7 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Proxy.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Proxy.pm @@ -7,10 +7,10 @@ package Lemonldap::NG::Handler::Proxy; use strict; -use Lemonldap::NG::Handler::Simple qw(:apache :headers); +use Lemonldap::NG::Handler::Simple qw(:apache :headers :traces); use LWP::UserAgent; -our $VERSION = '0.41'; +our $VERSION = '0.42'; ########################################## # COMPATIBILITY WITH APACHE AND APACHE 2 # @@ -85,7 +85,7 @@ sub run($$) { # copy POST data, if any if ( $r->method eq "POST" ) { - my $len = $r->header_in('Content-Length'); + my $len = $r->headers_in->{'Content-Length'}; my $buf; $r->read( $buf, $len ); $request->content($buf); @@ -142,7 +142,6 @@ sub headers { 1; } ); - $r->send_http_header; $headers_set = 1; } diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm index 77a68e29d..7763aef7d 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm @@ -71,7 +71,7 @@ BEGIN { lmSetHeaderOut lmSetErrHeaderOut $cookieName $https $port ) ], - traces => [qw( $whatToTrace $statusPipe $statusOut )], + traces => [qw( $whatToTrace $statusPipe $statusOut lmLog )], apache => [qw( MP OK REDIRECT FORBIDDEN DONE DECLINED SERVER_ERROR )], post => [qw($transform)], cda => ['$cda'],