Bug 64663 - Please set prefer-language
Summary: Please set prefer-language
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_negotiation (show other bugs)
Version: 2.5-HEAD
Hardware: PC FreeBSD
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2020-08-12 08:29 UTC by Rob
Modified: 2020-08-12 09:41 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Rob 2020-08-12 08:29:16 UTC

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,

[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'.