如何使用 mod_perl2 和 Apache Bucket Brigades?

发布于 2024-07-18 13:39:24 字数 307 浏览 3 评论 0原文

我正在编写一个应用程序来动态代理和重写网页,并且非常确定使用 mod_perl2 - 我正在使用 mod_perl (v1) 的现有实现。 在 mod_perl2 中,有 APR::Brigades 和 APR::Buckets 的想法,从我模糊的理解来看,它们是进行过滤和存储的有效方法。 重写我想要的。 然而,除了这些模块的 Perldoc 页面之外,我找不到任何东西,所以我真的很不确定如何使用它们。

任何人都可以向我解释 mod_perl2 Bucket Brigades,为我提供教程,甚至向我展示一些我可以学习的使用 mod_perl2 的开源应用程序吗?

I'm writing an application to do proxying and rewriting of webpages on the fly and am pretty settled on using mod_perl2 - there is an existing implementation using mod_perl (v1) that I'm working from. In mod_perl2, there's this idea of APR::Brigades and APR::Buckets which, from my vague understanding, are an efficient way to do the sort of filtering & rewriting that I want. I can't, however, find anything but the Perldoc pages for these modules, so I'm really quite unsure how to utilize them.

Can anyone explain mod_perl2 Bucket Brigades to me, point me to a tutorial, or even show me some open-source app that uses mod_perl2 that I could learn from?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苦行僧 2024-07-25 13:39:24

Buckets 和 Brigade 是 Apache Portable Runtime 的原生概念。 您将在 Apache HTTP Server 模块(如 mod_proxy、mod_deflate 和 mod_substitute)的源代码中找到大量具有 HTTP 特定倾向的本机 API 示例。

在此处查看过滤器信息:
http://www.apachetutor.org/dev/#filter

然后看一下前面提到的 Apache HTTP Server 模块。

这里似乎有一个简单的特定于 perl 的过滤器:

http: //perl.apache.org/docs/2.0/user/handlers/filters.html#Bucket_Brigade_based_Output_Filters

Buckets and Brigades are native concept to the Apache Portable Runtime. You'll find ample examples of the native API, with a HTTP-specific slant, in the source code for Apache HTTP Server modules like mod_proxy, mod_deflate, and mod_substitute.

See the filter info here:
http://www.apachetutor.org/dev/#filter

Then take a peek at the previously mentioned Apache HTTP Server modules.

There seems to be a simple perl-specific filter here:

http://perl.apache.org/docs/2.0/user/handlers/filters.html#Bucket_Brigade_based_Output_Filters

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文