Yeah, my apologies.. I was doing something entirely different wrong when setting my cookies and my analysis falsely made me hang up on the send_http_header filter issue.

Should have inspected my err_headers_out before posting my non-existent problem.

whoops,
arne

On Oct 27, 2003, at 4:22 PM, Kip Hampton wrote:

Arne Claassen wrote:

Well, so much for my architecture built around AxKit. Everything's based around mod_perl apps generating XML, passing it to AxKit for rendering. To do this my application framework implements an AxKit::Provider::Filter and registers itself as an Apache::Filter... only problem, as a filter, it can't send headers, so i can't set cookies, so my application cannot work, since it uses cookies for sessioning and other fun things..

I'm not sure how you're trying to set the cookies but I just whipped out a small Filter-aware mod_perl handler that sets a Cookie via Apache::Cookie and generates an XML doc for AxKit to style; it all works as expected.


Compare:

package MPEnvWithCookie;
use strict;
use Apache::Cookie;

sub handler {
    my $r = shift;
    $r = $r->filter_register();

    my $cookie = Apache::Cookie->new($r,
                             -name    =>  'foo',
                             -value   =>  'bar'
                            );
    $cookie->bake;

    $r->print( '<?xml version="1.0"?>
<root>
');

    foreach my $field ( keys(%ENV) ) {
        $r->print(qq|<field name="$field">$ENV{$field}</field>|);
    }

    $r->print('</root>
');

}

1;

How is yours different?

-kip


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to