Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-381

Missing HttpContext in HttpAsyncRequestHandlerMapper

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.3.2
    • 5.0-alpha1
    • HttpCore, HttpCore NIO
    • None

    Description

      It is a common use case to use a custom HttpAsyncRequestHandlerMapper implementation to match the URLs against a list of regular expressions. Often these regular expressions include capture groups that can be used to extract parameters from the URL.

      In `/user/(\d+)/profile` for example the group can be extracted and converted to an integer. While the HttpAsyncRequestHandlerMapper implementation already does the regex matching, it has no place to save the matching results since the HttpContext is not passed to the mapper.

      The naive way to fix this is to include the HttpContext in the lookup() method interface, but unfortunately that would be a breaking change. I hope that someone is able to come up with a better solution for this.

      This issue is to some degree related to https://issues.apache.org/jira/browse/HTTPCORE-308

      Attachments

        Activity

          People

            Unassigned Unassigned
            TBieniek Tobias Bieniek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: