apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: [PATCH] table patch using mergesort Re: Frankentables
Date Mon, 23 Jun 2003 04:45:47 GMT
Brian Pane <brian.pane@cnet.com> writes:

> This patch is failing several of the mod_headers tests
> in perl-framework.  For now, I'll commit a version
> without the merge and copy callbacks.  It should be
> easy to add those back in later, by keeping the
> merge-or-copy flag in apr_table_compress and letting
> it call the callbacks based on which flag value is set.

OK.  I've looked into the test failures, and it looks to
me like the cause is a semantic change in apr_table_mergen.
With the callback API, apr_table_merge with preexisting headers
will merge *all* of them into a single header, whereas the
current code only merges *the first* occurrence.  

To get the mod_headers tests to pass, here is a patch to 
httpd-test/perl-framework/t/modules/headers.t

Index: t/modules/headers.t
===================================================================
RCS file: /home/cvspublic/httpd-test/perl-framework/t/modules/headers.t,v
retrieving revision 1.2
diff -u -r1.2 headers.t
--- t/modules/headers.t 18 Sep 2001 15:41:03 -0000      1.2
+++ t/modules/headers.t 23 Jun 2003 04:38:10 -0000
@@ -79,8 +79,10 @@
                 ## with the same name, 'append' appends the value
                 ## to the FIRST instance of that header.
                 if (@expected_value) {
-                    $expected_value[0] .= ", $test_value";
-
+                    $expected_value = join ', ', @expected_value, 
+                                                 $expected_value, $test_value;
+                    @expected_value = ();
+                    $expected_exists = 1;
                 } elsif ($expected_value) {
                     $expected_value .= ", $test_value";
                 } else {


-- 
Joe Schaefer


Mime
View raw message