]> git.decadent.org.uk Git - maypole.git/commitdiff
misc fixes for header support (see list)
authorMarcus Ramberg <mramberg@cpan.org>
Thu, 9 Dec 2004 07:20:26 +0000 (07:20 +0000)
committerMarcus Ramberg <mramberg@cpan.org>
Thu, 9 Dec 2004 07:20:26 +0000 (07:20 +0000)
git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@309 48953598-375a-da11-a14b-00016c27c3ee

lib/Apache/MVC.pm
lib/CGI/Maypole.pm
lib/Maypole.pm
lib/Maypole/Headers.pm

index 7dbb2416dfbb53fa29fa616d72eb4143a9b7e093..ba0fec0ad01fcf09da1348a24a10e33096220d6a 100644 (file)
@@ -30,7 +30,7 @@ sub parse_location {
     my $self = shift;
 
     # Reconstruct the request headers
-    $self->headers_in(HTTP::Headers->new);
+    $self->headers_in(Maypole::Headers->new);
     my %headers = $self->{ar}->headers_in;
     for (keys %headers) {
         $self->headers_in->set($_, $headers{$_});
@@ -63,7 +63,7 @@ sub send_output {
     );
 
     foreach ($r->headers_out->field_names) {
-        next if /^Content-/;
+        next if /^Content-(Type|Length)/;
         $r->{ar}->headers_out->set($_ => $r->headers_out->get($_));
     }
 
index 94fd27b3f79458245154e584a4dc4c596cf73176..793d47fb1d5c3ea1032841719281e05afc35fb4e 100644 (file)
@@ -59,7 +59,7 @@ sub send_output {
         -content_length  => do { use bytes; length $r->{output} },
     );
     foreach ($r->headers_out->header_field_names) {
-        next if /^Content-/;
+        next if /^Content-(Type|Length)/;
         $headers{"-$_"} = $r->headers_out->get($_);
     }
 
index 3215b842320c6a7b8be7c002a1471c6cf6e4a153..de7fbebd5938fa46625919fe4c94869c3a8468ae 100644 (file)
@@ -185,6 +185,7 @@ sub parse_path {
     shift @pi while @pi and !$pi[0];
     $self->{table}  = shift @pi;
     $self->{action} = shift @pi;
+    $self->{action} = "index" unless $self->{action};
     $self->{args}   = \@pi;
 }
 
index a72f01c5b712b913a7b876bcf0ebbe7668025c68..16646faad9fcd88d58c897b0eb5eb40381b90cd3 100644 (file)
@@ -42,7 +42,7 @@ Maypole::Headers - Convenience wrapper around HTTP::Headers
 
     use Maypole::Headers;
 
-    $r->headers_out(Maypole::Headers->new);
+    $r->headers_out(Maypole::Headers->new); # Note, automatic in Maypole
     $r->headers_out->set('Content-Base' => 'http://localhost/maypole');
     $r->headers_out->push('Set-Cookie' => $cookie->as_string);
     $r->headers_out->push('Set-Cookie' => $cookie2->as_string);