Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 96F7611D8C for ; Fri, 16 May 2014 23:14:45 +0000 (UTC) Received: (qmail 52617 invoked by uid 500); 16 May 2014 22:51:27 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 22610 invoked by uid 500); 16 May 2014 22:38:38 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 12054 invoked by uid 99); 16 May 2014 22:30:51 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 May 2014 22:30:51 +0000 Date: Fri, 16 May 2014 22:30:51 +0000 (UTC) From: "Tobias Bieniek (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HTTPCORE-381) Missing HttpContext in HttpAsyncRequestHandlerMapper MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCORE-381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14000416#comment-14000416 ] Tobias Bieniek commented on HTTPCORE-381: ----------------------------------------- "Are we only trying to avoid an additional regex match operation here?" Technically yes. Although it is a bit more complicated as the handler would need to know about the specific regex that caused the mapper to select the handler. If a handler is registered for several different regexes things would get more complicated... > 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 (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org