Hi Kristian, Just my $0.02, but when you call $m->flush_buffer(), there is potentially already something in them (like white spaces from components), and flush them makes Mason spit out the headers. And as I understand you code, at that point in time, you have not set the status code to 302, that is done later in your redirect component, unfortunately too late.
Note that Oliver uses $m->clear_buffer, which does not force the emission of headers, hence his status gets sent and not the default Mason of 200. Please verify this, but this is what I faced some tima ago on one of my sites. On Tuesday 05 December 2006 12:49, Kristian Nilssen wrote: > if( $m->session->{isplaying} == 1 ) { > $m->flush_buffer(); > $m->comp('redirect', url=>'/next_image.html'); > } > Oliver Jeeves wrote: > $m->auto_send_headers(0); > $r->headers_out->add('Location' => $url); > $r->status($status); > $m->clear_buffer; > ## include status here anyway, just in case it's started > ## working again > $m->abort($status); --paf ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users