I've tried your library code but same probs. Perhaps it's how I'm
calling the function? I have tried as you suggested with a full url
too. (url="" class="moz-txt-link-freetext" href="http://myserver/next_image.html">http://myserver/next_image.html'). It's an image
sequence so hence the flush_buffer then try to load the next image. I
have also tried with status codes 301, 302 and 303. Basically I have
some html which draws an image, then I call the perl block below... <%perl> if( $m->session->{isplaying} == 1 ) { $m->flush_buffer(); $m->comp('redirect', url=""> } </%perl> rgds, Kristian. Oliver Jeeves wrote: Kristian Nilssen wrote:Thanks for your reply, I made a redirect component which looks like this... <%init> $r->status(302); $m->redirect($url); </%init><%args> $url # URL to redirect to </%args> but it produces the same 200 ok problem. I must be missing something? rgds, Kristian.That's curious, I would expect that to work. I've implemented redirect as a library function, as opposed to a component, and I'm writing the headers myself, as opposed to using $m->redirect. Here is the code I use: $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); I don't know if you'd have any more luck with that? You might also want to play around with $url a bit if using this method, IIRC you're not supposed to have relative URLs in the Location header. I use a combination of $r->uri and $r->construct_url to play with $url. -Oli |
------------------------------------------------------------------------- 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