Separate Request Scope from HttpServletRequest Attributes with Configurable Option

Description

Implement a configurable option to separate the request scope from the HttpServletRequest attributes in Lucee. This enhancement should allow users to choose whether the request scope is linked directly to HttpServletRequest attributes or operates independently.

Requirements:

  1. Introduce a new environment variable and system property to control the linkage:

    • Environment Variable: LUCEE_REQUEST_LINKED=true|false

    • System Property: -Dlucee.request.linked=true|false

  2. Default Behavior: During the beta phase, the default setting will be unlinked (false), meaning the request scope will not reflect HttpServletRequest attributes. This approach minimizes unnecessary overhead for most applications. Based on user feedback during beta, we may adjust the default to true if significant demand for linkage is observed.

  3. Future Consideration: While the linkage remains enabled by default, consider updating the default setting in future releases based on user feedback and system requirements.

Reason for Change:

In practice, it is extremely rare for applications to utilize the link between the request scope and HttpServletRequest attributes. For most applications, this linkage introduces unnecessary overhead with no practical benefit. By allowing the option to disable this linkage, we can improve performance and reduce resource usage for the majority of applications that do not rely on it.

Implementation:

  • Develop two implementations for the request scope:

    1. One that links directly to HttpServletRequest attributes.

    2. Another that operates independently.

  • Integrate logic to select the appropriate implementation based on the environment variable or system property setting.

Goal:

This change will provide greater flexibility and configurability, allowing applications to manage request scope behavior more granularly and reduce unnecessary overhead in typical use cases.

Activity

Show:

Details

Assignee

Reporter

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Fix versions

Priority

Created 8 November 2024 at 10:04
Updated 25 March 2025 at 10:53

Flag notifications