doushishi2415 2013-07-03 05:46 采纳率: 0%
浏览 240

在Apache 2.4中删除了带有下划线的所有大写HTTP标头

I have an app that relies on sending all-caps-with-underscores HTTP headers along with a request.

Starting with Apache 2.4,

Headers containing invalid characters (including underscores) are now silently dropped

This page suggests there are settings you can change that would allow legacy HTTP headers that aren't stripped (i.e., if they're set in CURL, then they would show up in the $_SERVER array in PHP) but it doesn't say how. I tried adding the following to my HTACCESS file,

SetEnvIfNoCase ^Accept.Encoding$ ^(.*)$ fix_accept_encoding=$1 RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encoding

but it didn't seem to help. Has anyone else experienced this when moving from Apache 2.2 to 2.4?

  • 写回答

3条回答 默认 最新

  • dt4233 2013-07-03 06:29
    关注

    Not sure how much access you have to the machine. But you could use PHP to check for the modules

    print_r(apache_get_modules());
    

    If you have mod_setenvif and mod_headers your .htaccess rules should be fine

    评论

报告相同问题?

悬赏问题

  • ¥15 CARSIM前车变道设置
  • ¥50 三种调度算法报错 有实例
  • ¥15 关于#python#的问题,请各位专家解答!
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败