[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] HttpClientConnection.getHeaderFields to support multiple header values

Hi,

great! I am current working on adding support to bearer authentication
header fields (used with OAuth2) and I was not understanding how JGit
would deal with servers supporting basic and bearer. I was expecting
JGit to support multiple WWW-Authenticate but couldn't find that. Now
I learned about this bug. If you propose to gerrit I would love to
review.

Ciao
  Chris


On Tue, Jun 19, 2018 at 3:38 AM, Gabriel Couto <gmcouto@xxxxxxxxx> wrote:
> Hello dear JGit devs,
>
> I have come here to bring a patch for an old bug that might have never been
> reported.
> We might see in the internet it is very hard to get JGit to connect to a TFS
> server, but today I have found the reason.
>
> It is because of HttpClientConnection.getHeaderFields. If a server replies
> with multiple WWW-Authenticate, it will consider only the last value read.
> Except the correct behavior is to provide a list of all the values if same
> header key.
>
> Because of this bug JGit will not even try other authentication methods if
> NTLM is the last one in the response header.
>
> I have patched this with a Pull Request, that I kindly ask to be accepted:
> https://github.com/eclipse/jgit/pull/68
>
> I also have workarounds provided if anyone is facing a similar issue, and
> can't wait for the fix:
> https://stackoverflow.com/a/50919290/697399
>
> Regards,
> Gabriel Couto
>
> _______________________________________________
> jgit-dev mailing list
> jgit-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/jgit-dev