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 0636217793 for ; Thu, 5 Feb 2015 22:54:35 +0000 (UTC) Received: (qmail 99628 invoked by uid 500); 5 Feb 2015 22:54:34 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 99581 invoked by uid 500); 5 Feb 2015 22:54:34 -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 99539 invoked by uid 99); 5 Feb 2015 22:54:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Feb 2015 22:54:34 +0000 Date: Thu, 5 Feb 2015 22:54:34 +0000 (UTC) From: "Marcos Scriven (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HTTPCLIENT-1607) Change ContextAwareAuthScheme.authenticate to return a HeaderGroup instead of a single Header 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/HTTPCLIENT-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcos Scriven updated HTTPCLIENT-1607: --------------------------------------- Description: While writing a custom {{AuthScheme}}, I needed to add multiple headers to the request. This is of course possible just by directly adding them to the request available as a parameter, but then it makes the return value rather arbitrary. Returning null seems to work, and is just silently ignored. I think it would be more flexible to change the interface to return a `HeaderGroup`. I guess an alternative would be to write a custom filter somewhere, but that wouldn't tie in nicely with authentication caches and user credentials automatically being applied according to the host route. was: While writing a custom `AuthScheme`, I needed to add multiple headers to the request. This is of course possible just by directly adding them to the request available as a parameter, but then it makes the return value rather arbitrary. Returning null seems to work, and is just silently ignored. I think it would be more flexible to change the interface to return a `HeaderGroup`. I guess an alternative would be to write a custom filter somewhere, but that wouldn't tie in nicely with authentication caches and user credentials automatically being applied according to the host route. > Change ContextAwareAuthScheme.authenticate to return a HeaderGroup instead of a single Header > --------------------------------------------------------------------------------------------- > > Key: HTTPCLIENT-1607 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1607 > Project: HttpComponents HttpClient > Issue Type: Wish > Components: HttpClient > Affects Versions: 4.3.6 > Reporter: Marcos Scriven > Priority: Minor > Fix For: 4.4 Final > > > While writing a custom {{AuthScheme}}, I needed to add multiple headers to the request. > This is of course possible just by directly adding them to the request available as a parameter, but then it makes the return value rather arbitrary. Returning null seems to work, and is just silently ignored. > I think it would be more flexible to change the interface to return a `HeaderGroup`. > I guess an alternative would be to write a custom filter somewhere, but that wouldn't tie in nicely with authentication caches and user credentials automatically being applied according to the host route. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org