【问题标题】:CGI script runned with ModPerl::Registry doesn't print result on html page, just download it使用 ModPerl::Registry 运行的 CGI 脚本不会在 html 页面上打印结果,只需下载即可
【发布时间】:2019-11-08 10:48:55
【问题描述】:

这是我的沙盒https://github.com/pavelsr/mod_perl_sandbox

当我创建 docker-compose up 然后转到 http://localhost:3000/env.pl 结果 html 已下载,未提供。

在 CGI 模式下(在 docker-compose 中删除了 -DMODPERL)一切正常。

好像 ModPerl::Registry 没有处理 Content-type: text/html

我需要在httpd.conf 中修复什么?

添加PerlOptions +ParseHeaders 不会解决问题

【问题讨论】:

    标签: mod-perl2 mod-perl-registry


    【解决方案1】:

    已修复。 PerlOptions +ParseHeaders<Location 标签内,因此无法正常工作。要修复它,您应该将 ParseHeaders 移动到 <Directory 或全局设置。

    https://github.com/pavelsr/mod_perl_sandbox - 如何在 CGI 和 mod_perl 下运行相同的 perl 脚本的工作示例

    【讨论】:

      猜你喜欢
      • 2014-10-30
      • 2012-01-07
      • 2016-09-19
      • 2013-11-21
      • 1970-01-01
      • 2014-12-19
      • 2017-05-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多