Merge pull request #2601 from jgarzik/uri-validate

RPC: strictly require HTTP URI "/"
This commit is contained in:
Jeff Garzik 2013-05-02 12:26:55 -07:00
commit d9dd0318e1

View File

@ -940,6 +940,11 @@ void ServiceConnection(AcceptedConnection *conn)
// Read HTTP message headers and body
ReadHTTPMessage(conn->stream(), mapHeaders, strRequest, nProto);
if (strURI != "/") {
conn->stream() << HTTPReply(HTTP_NOT_FOUND, "", false) << std::flush;
break;
}
// Check authorization
if (mapHeaders.count("authorization") == 0)
{