How do I suppress the default apache error document in mod_perl?

跟風遠走 提交于 2019-12-06 16:38:00

See Apache2::Response. I do not have time to experiment right now, but that should work.

Are you asking how to send no message body in your response?

If you want something other than what apache is going to do for you, you need to handle the request yourself. What does the rest of your handler look like? Posting code keeps us from guessing what you are doing.

The return value from your handler lets apache know if you handled the request yourself or if it needs to do something more on your behalf. I'm guessing that you're doing the latter.

I was looking for this too. And the trick was quite simple:

$r->status(HTTP_NOT_FOUND);
$r->custom_response(404, "");
return OK;

where $r is Apache2::Response object.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!