output multiline %headers as multiple headers of the same name
[perl/plp/.git] / lib / PLP / Functions.pm
index 18318ad7b0bacbdf643f0037fee5f202abb84ea2..f3621671470603b3f04f3dc086c57b22ca9ca09b 100644 (file)
@@ -6,6 +6,7 @@ use warnings;
 use Exporter qw(import);
 use Fcntl qw(:flock);
 
+our $VERSION = '1.00';
 our @EXPORT = qw/Entity DecodeURI EncodeURI Include include PLP_END
                  AddCookie ReadFile WriteFile AutoURL Counter exit/;
 
@@ -74,7 +75,7 @@ sub EncodeURI (@) {
 
 sub AddCookie ($) {
        if ($PLP::Script::header{'Set-Cookie'}) {
-               $PLP::Script::header{'Set-Cookie'} .= "\nSet-Cookie: $_[0]";
+               $PLP::Script::header{'Set-Cookie'} .= "\n" . $_[0];
        } else {
                $PLP::Script::header{'Set-Cookie'} = $_[0];
        }