diff --git a/deps/rabbitmq_web_dispatch/priv/www/test-client.js b/deps/rabbitmq_web_dispatch/priv/www/test-client.js index fc2df08ebd..368f21568a 100644 --- a/deps/rabbitmq_web_dispatch/priv/www/test-client.js +++ b/deps/rabbitmq_web_dispatch/priv/www/test-client.js @@ -7,7 +7,7 @@ function log() { function testMain() { log("Starting."); - var testService = new JsonRpcService(document.location + "rpc/test", onReady); + var testService = new JsonRpcService("/rpc/test", onReady); function onReady() { testService.test_proc("Hello, world!").addCallback(log); } diff --git a/deps/rabbitmq_web_dispatch/src/mod_http_web.erl b/deps/rabbitmq_web_dispatch/src/mod_http_web.erl index 602c8a2281..3387879b8c 100644 --- a/deps/rabbitmq_web_dispatch/src/mod_http_web.erl +++ b/deps/rabbitmq_web_dispatch/src/mod_http_web.erl @@ -30,8 +30,7 @@ loop(Req, DocRoot) -> Req:serve_file(Path, DocRoot) end; 'POST' -> - %% TODO The path is hard coded to handle mod_http_test - case rfc4627_jsonrpc_mochiweb:handle("/mod_http_test/rpc", Req) of + case rfc4627_jsonrpc_mochiweb:handle("/rpc", Req) of no_match -> io:format("PROCESSING REQUEST ~p~n",[Req]), Req:not_found(); @@ -41,7 +40,7 @@ loop(Req, DocRoot) -> _ -> Req:respond({501, [], []}) end. - + %% ---------------------------------------------------------------------- %% NON-HTTP API - maybe this should go in some other module %% ----------------------------------------------------------------------