httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Brown" <da...@splut.com>
Subject Re: Bake & err_header_out error
Date Fri, 03 Jun 2005 20:53:47 GMT
OK, my mistake..

Always the way isn't it.. you spend hours trying to solve a problem.. then
the minute after you ask for help you work it out.

The answer to my problem was this

$c_out->bake();

should be

$c_out->bake($r);

It's probably well documented .. but I managed to miss it !

----- Original Message -----
From: "David Brown" <david@splut.com>
To: <apreq-dev@httpd.apache.org>
Sent: Friday, June 03, 2005 9:35 PM
Subject: Bake & err_header_out error


> I'm having problems with the latest libapreq2-2.05.
>
> If I run the sample script (below) I get this error
>
> "Can't call method "err_headers_out" on an undefined value at
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Apache2/Cookie.pm
> line 85"
>
> The error comes at the "bake" command.. commenting it out lets the script
> run fine (albeit with no cookie sent to the browser).
>
>
> test.pl
> -----------
>
> use Apache2::Request;
> use Apache2::Cookie;
> $r = shift; $c_out = Apache2::Cookie->new($r,  -name  =>
> mycookie",  -value => "TEST VALUE" );$c_out->path("/bar");               #
> set path to "/bar"
> $c_out->bake;                       # send cookie in response
> headers$r->content_type("text/html");$r->print("Hello World");



Mime
View raw message