You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Marcos Scriven (JIRA)" <ji...@apache.org> on 2015/08/12 18:27:45 UTC
[jira] [Comment Edited] (HTTPCLIENT-1607) Change
ContextAwareAuthScheme.authenticate to return a HeaderGroup instead of a
single Header
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14693758#comment-14693758 ]
Marcos Scriven edited comment on HTTPCLIENT-1607 at 8/12/15 4:27 PM:
---------------------------------------------------------------------
[~olegk]
I just took at look at master and the Javadoc still seems to say the {{AuthScheme}} returns a header?
https://github.com/apache/httpclient/blame/trunk/httpclient/src/main/java/org/apache/http/auth/AuthScheme.java#L183
was (Author: marcosscriven):
[~olegk]
I just took at look at master and the Javadoc still seems to say the ```AuthScheme``` returns a header?
https://github.com/apache/httpclient/blame/trunk/httpclient/src/main/java/org/apache/http/auth/AuthScheme.java#L183
> 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
>
> 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 intuitive to change the interface to return a {{HeaderGroup}} instead.
> 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