Bug 64663

Summary: Please set prefer-language
Product: Apache httpd-2 Reporter: Rob <apache>
Component: mod_negotiationAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 2.5-HEAD   
Target Milestone: ---   
Hardware: PC   
OS: FreeBSD   

Description Rob 2020-08-12 08:29:16 UTC
Hello,

This page [1] explains how mod_negotiation supports the 'prefer-language' environment variable. But unfortunately, the module does not set this variable. This means that currently, if I need to determine the language the server has selected within the file/script served, I have no other option than to dissect the DOCUMENT_NAME variable. But since the module has already made the selection, it's probably trivial to have it set this environment variable.

Thanks for considering,
  Rob


[1] https://httpd.apache.org/docs/2.4/content-negotiation.html
Comment 1 Rob 2020-08-12 09:41:21 UTC
Thinking beyond my own use case (mod_include, creation of URLs for images, style sheets and scripts, and design of links), I can imagine that this may not be desirable in every situation. So I guess that if this is implemented, it should come with a configuration directive SetPreferLanguage that may be set to 'on' or 'off'.