maxdemarzi/neography — pull request #147 by leosoto (2014-02-13 03:38:52+00:00)
Title: Avoid waiting for a WWW-Authenticate under HTTP Basic auth

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.