cvsuser 02/11/01 11:54:53 Modified: App-Context/lib/App/Context HTTP.pm Log: add set_header() method Revision Changes Path 1.3 +29 -1 p5ee/App-Context/lib/App/Context/HTTP.pm Index: HTTP.pm =================================================================== RCS file: /cvs/public/p5ee/App-Context/lib/App/Context/HTTP.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- HTTP.pm 15 Oct 2002 21:58:49 -0000 1.2 +++ HTTP.pm 1 Nov 2002 19:54:53 -0000 1.3 @@ -1,6 +1,6 @@ ############################################################################# -## $Id: HTTP.pm,v 1.2 2002/10/15 21:58:49 spadkins Exp $ +## $Id: HTTP.pm,v 1.3 2002/11/01 19:54:53 spadkins Exp $ ############################################################################# package App::Context::HTTP; @@ -218,6 +218,34 @@ } else { print $headers, "\n", $content; + } +} + +############################################################################# +# set_header() +############################################################################# + +=head2 set_header() + + * Signature: $context->set_header() + * Param: void + * Return: void + * Throws: App::Exception + * Since: 0.01 + + Sample Usage: + + $context->set_header(); + +=cut + +sub set_header { + my ($self, $header) = @_; + if ($self->{headers}) { + $self->{headers} .= $header; + } + else { + $self->{headers} = $header; } }