简体   繁体   English

Perl Apache过滤器验证HTTP请求中的标头

[英]Perl apache filter validate the header in HTTP request

i want to write an apache filter written in perl that checks the request in input validating it only if there are some particular datas in the header otherwise it returns 401 Forbidden. 我想编写一个用perl编写的apache过滤器,该过滤器仅在标头中有某些特定数据时才检查输入中的请求,以验证请求,否则返回401 Forbidden。

Anyone can please help me providing a skeleton of such a filter, I'm trying to read the official documentation but I can't figure out how to the skeleton of the script. 任何人都可以帮助我提供此类过滤器的框架,我正在尝试阅读官方文档,但我不知道如何处理脚本的框架。

Thanks in advance. 提前致谢。 Andrea 安德里亚

That's not a filter, this word has a specific different meaning in the context of Apache httpd. 那不是一个过滤器,这个词在Apache httpd的上下文中具有特定的不同含义。

You want to write a handler, see chapter Handler Modules in *Getting Your Feet Wet with mod_perl* . 您想编写一个处理程序,请参阅*用mod_perl弄湿你的脚*中的处理程序模块一章。 To inspect headers, call the headers_in method from Apache2::RequestRec . 要检查标题,请Apache2::RequestRec调用headers_in方法

Read the whole manual and documentation already, you can easily answer yourself a simple question like this. 已经阅读了完整的手册文档 ,您可以轻松地回答一个像这样的简单问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM