[Bps-public-commit] HTTP-Server-Simple branch, master, updated. 0.50-3-gce40384

? sunnavy sunnavy at bestpractical.com
Mon Sep 14 13:10:21 EDT 2015


The branch, master has been updated
       via  ce40384d3f1570b38b0531f6d701fecbbbaff33f (commit)
       via  00c523bcbca7c06dd7444cbfb34bd491ad317432 (commit)
      from  be03b72de80471ca2434f65e375179592dcf82b2 (commit)

Summary of changes:
 lib/HTTP/Server/Simple/CGI/Environment.pm |  2 +-
 t/04cgi.t                                 | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 00c523bcbca7c06dd7444cbfb34bd491ad317432
Author: Kevin Falcone <kevin at jibsheet.com>
Date:   Mon Apr 20 22:03:01 2015 -0400

    Fix test count in freebsd jails
    
    Tests added in d755a1cd and 140c8684 assumed a stepped 5 test difference
    on freebsd without accounting for the fact that each of the 5 skipped
    methods/environments are actually tested 3 times for a total current
    diff of 15.
    
    Reported in RT#103794

diff --git a/t/04cgi.t b/t/04cgi.t
index 76b117f..a5f6000 100644
--- a/t/04cgi.t
+++ b/t/04cgi.t
@@ -34,7 +34,7 @@ my %envvars=(
 if ($^O eq 'freebsd' && `sysctl -n security.jail.jailed` == 1) {
     delete @methods{qw(url server_name)};
     delete @envvars{qw(SERVER_URL SERVER_NAME REMOTE_ADDR)};
-    plan tests => 55;
+    plan tests => 45;
 }
 else {
     plan tests => 60;

commit ce40384d3f1570b38b0531f6d701fecbbbaff33f
Author: Alex Tokarev <nohuhu at nohuhu.org>
Date:   Thu Jun 19 17:49:18 2014 -0700

    Better compatibility with CGI.pm < 3.36

diff --git a/lib/HTTP/Server/Simple/CGI/Environment.pm b/lib/HTTP/Server/Simple/CGI/Environment.pm
index 4b2c895..33a702d 100644
--- a/lib/HTTP/Server/Simple/CGI/Environment.pm
+++ b/lib/HTTP/Server/Simple/CGI/Environment.pm
@@ -105,7 +105,7 @@ sub header {
         unless $tag =~ m/^CONTENT_(?:LENGTH|TYPE)$/;
 
     if ( exists $ENV{$tag} ) {
-        $ENV{$tag} .= ", $value";
+        $ENV{$tag} .= $tag eq 'HTTP_COOKIE' ? "; $value" : ", $value";
     }
     else {
         $ENV{$tag} = $value;
diff --git a/t/04cgi.t b/t/04cgi.t
index a5f6000..20655aa 100644
--- a/t/04cgi.t
+++ b/t/04cgi.t
@@ -34,10 +34,10 @@ my %envvars=(
 if ($^O eq 'freebsd' && `sysctl -n security.jail.jailed` == 1) {
     delete @methods{qw(url server_name)};
     delete @envvars{qw(SERVER_URL SERVER_NAME REMOTE_ADDR)};
-    plan tests => 45;
+    plan tests => 46;
 }
 else {
-    plan tests => 60;
+    plan tests => 61;
 }
 
 {
@@ -131,6 +131,13 @@ else {
       "uses HTTP_COOKIE",
   );
 
+  like(
+      fetch("GET /cgitest/raw_cookie HTTP/1.0",
+            "Cookie: foo=bar\r\nCookie: baz=qux",""),
+      qr|foo=bar[;,] baz=qux|,
+      "combines multiple cookies into HTTP_COOKIE"
+  );
+
   is(kill(9,$pid),1,'Signaled 1 process successfully');
   wait or die "counldn't wait for sub-process completion";
 }

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list