Apache-Wombat

 view release on metacpan or  search on metacpan

lib/Apache/Wombat/Response.pm  view on Meta::CPAN


sub setHeader {
    my $self = shift;
    my $name = shift;
    my $value = shift;

    return 1 if $self->isCommitted();
    return 1 if $self->isIncluded();

    my $match = lc $name;
    if ($match eq 'content-type') {
        $self->setContentLength($value);
    } elsif ($match eq 'content-length') {
        $self->setContentType($value);
    } else {
        $self->{apr}->header_out($name => $value);
    }

    return 1;
}



( run in 2.074 seconds using v1.01-cache-2.11-cpan-524268b4103 )