From 936a7552c7a237133f0ea888d337014be524476e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Oudot?= Date: Thu, 11 Mar 2010 10:44:48 +0000 Subject: [PATCH] Test: split multi-valued headers --- build/lemonldap-ng/_example/test/index.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build/lemonldap-ng/_example/test/index.pl b/build/lemonldap-ng/_example/test/index.pl index 59319d1f2..f96ed760e 100755 --- a/build/lemonldap-ng/_example/test/index.pl +++ b/build/lemonldap-ng/_example/test/index.pl @@ -115,13 +115,18 @@ print "

To know who is connected in your applications, you can read HTTP heade print "\n"; print "\n"; foreach(sort keys %$headers) { + next if $_ =~ /(Accept|Cache|User-Agent|Connection|Keep-Alive)/i; $style = $_ eq 'Auth-User' ? 'class="emphase"' : ''; print " - - \n" + + \n"; } print "
HeaderPerl CGIPHP scriptValue
$_ \$ENV{$headers->{$_}} \$_SERVER{$headers->{$_}}$ENV{$headers->{$_}}
    "; + foreach( split( /;/, $ENV{$headers->{$_}} ) ) { + print "
  • $_
  • "; + } + print "
\n"; print "

Note that Lemonldap::NG cookie is hidden. So that application developpers can