In addition to that, I've tried sending RPC commands with curl as described in
the Bitcoin wiki:
curl --user user --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8844/
This fails with a 401 error. It works against bitcoind (and, presumably, the other coin daemons...also tested it against 42, for instance), but not joulecoind. I'm giving it the same password that's in .joulecoin/joulecoin.conf, so that isn't it.
It should work the same as bitcoind.
This is the relevant code in rpcserver.cpp.
Do you get "ThreadRPCServer incorrect password attempt from ...." in your debug.log? Can you print out your raw http request?
// Check authorization
if (mapHeaders.count("authorization") == 0)
{
conn->stream() << HTTPReply(HTTP_UNAUTHORIZED, "", false) << std::flush;
break;
}
if (!HTTPAuthorized(mapHeaders))
{
LogPrintf("ThreadRPCServer incorrect password attempt from %s\n", conn->peer_address_to_string());
/* Deter brute-forcing short passwords.
If this results in a DoS the user really
shouldn't have their RPC port exposed. */
if (mapArgs["-rpcpassword"].size() < 20)
MilliSleep(250);
conn->stream() << HTTPReply(HTTP_UNAUTHORIZED, "", false) << std::flush;
break;
}