Setting the cookie spec of the underlying HttpClient is not impossible but rather elaborate at the moment (e.g. by redefining the implementation of ConfigurableHttpConnectionFactory). It would be great if JGitEnvironmentProperties had a property cookieSpec that would allow to set the cookie spec as needed.
Rather than introducing a property to do this I think it would provide us more flexibility if we added a way to customize the HttpClient. PR #2413 should accomplish this.
Problem description
I can use the config server with Bitbucket (v8.19.1) over http and authenticate with a token by exposing a bean like this:
This works generally fine but produces a warning like the following in the config service on every http connection to the repository:
Root cause
The problem can be fixed by setting the cookie spec of the request config to
STANDARD
with code like this (e.g. inHttpClient4Support
):Feature request
Setting the cookie spec of the underlying
HttpClient
is not impossible but rather elaborate at the moment (e.g. by redefining the implementation ofConfigurableHttpConnectionFactory
). It would be great ifJGitEnvironmentProperties
had a propertycookieSpec
that would allow to set the cookie spec as needed.