hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCORE-381) Missing HttpContext in HttpAsyncRequestHandlerMapper
Date Fri, 16 May 2014 11:23:36 GMT

    [ https://issues.apache.org/jira/browse/HTTPCORE-381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13998618#comment-13998618

Oleg Kalnichevski commented on HTTPCORE-381:

We could consider deprecating HttpAsyncRequestHandlerMapper in favor of a similar interface
that also takes HttpContext as a parameter but wound not it be easier to extract those parameters
from the handler? Are we only trying to avoid an additional regex match operation here?


> Missing HttpContext in HttpAsyncRequestHandlerMapper
> ----------------------------------------------------
>                 Key: HTTPCORE-381
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-381
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore NIO
>    Affects Versions: 4.3.2
>            Reporter: Tobias Bieniek
> 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

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message