]> git.decadent.org.uk Git - maypole.git/commitdiff
headers_in returns an APR table which acts like a hashref on apache2
authorMarcus Ramberg <mramberg@cpan.org>
Tue, 14 Dec 2004 23:23:58 +0000 (23:23 +0000)
committerMarcus Ramberg <mramberg@cpan.org>
Tue, 14 Dec 2004 23:23:58 +0000 (23:23 +0000)
git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@315 48953598-375a-da11-a14b-00016c27c3ee

lib/Apache/MVC.pm

index ba0fec0ad01fcf09da1348a24a10e33096220d6a..0ee09fac0c01e31c5d80ecb1f5f6b20b49bc0949 100644 (file)
@@ -31,7 +31,9 @@ sub parse_location {
 
     # Reconstruct the request headers
     $self->headers_in(Maypole::Headers->new);
-    my %headers = $self->{ar}->headers_in;
+    my %headers;
+    if (APACHE2) { %headers = %{$self->{ar}->headers_in};
+    } else { %headers = $self->{ar}->headers_in; }
     for (keys %headers) {
         $self->headers_in->set($_, $headers{$_});
     }