It worked when I tried the first method.

How about use 

return 404;

to instead of 

$m->abort(NOT_FOUND)?

-----邮件原件-----
发件人: mason-users-boun...@lists.sourceforge.net
[mailto:mason-users-boun...@lists.sourceforge.net] 代表 Justin Wyllie
发送时间: 2009年12月16日 9:33
收件人: mason-users@lists.sourceforge.net
主题: [Mason] Returning NOT_FOUND


Hi

I have these lines in a dhandler:

use Apache2::Const qw(NOT_FOUND)
$m->clear_buffer;
$m->abort(NOT_FOUND);

The abort works; in that it stops output. But I am still getting a 200 not a
404.

I also tried:

use Apache2::Const qw(NOT_FOUND)
$m->clear_buffer;
$m->abort(Apache2::Const::NOT_FOUND);

I haven't touched autoflush so I assume it is off.

(I'm running Perl 5.8.8 mod_perl 2.0.4 , Mason 1.42 and Apache 2.0.52 on
RedHat Linux).

Thanks

Justin Wyllie


----------------------------------------------------------------------------
--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users



------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to