Avoid waiting for a WWW-Authenticate under HTTP Basic auth #147
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
HTTPClient doesn't send any credentials unless it has seen a previous
challenge for the requested URL in the form of a WWW-Authenticate
header. Such challenge is sent by the server after it receives an
unauthenticated request to such URL. The wasted roundtrip wouldn't
be too bad if it were limited to the first request. However,
httpclient only remembers the challenge for each individual URL and
their 'child' URLs. This means that, for example, HTTP requests to
/db/data/node/ will probably incur in a new wasteful rountrip
for each different value of .
The fix makes httpclient think that it has received a challenge
for the root URL of the neo4j server.