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{$_});
);
foreach ($r->headers_out->field_names) {
- next if /^Content-/;
+ next if /^Content-(Type|Length)/;
$r->{ar}->headers_out->set($_ => $r->headers_out->get($_));
}
-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($_);
}
shift @pi while @pi and !$pi[0];
$self->{table} = shift @pi;
$self->{action} = shift @pi;
+ $self->{action} = "index" unless $self->{action};
$self->{args} = \@pi;
}
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);