From 70a80b1455e11e5572eac4bd4b7ca647c45bbf81 Mon Sep 17 00:00:00 2001 From: Nils Maier Date: Mon, 21 Jul 2014 08:11:14 +0200 Subject: Remove request pre-authorization again --- src/WebSocketSession.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/WebSocketSession.cc') diff --git a/src/WebSocketSession.cc b/src/WebSocketSession.cc index b035eb18..57ac56b8 100644 --- a/src/WebSocketSession.cc +++ b/src/WebSocketSession.cc @@ -165,7 +165,6 @@ void onMsgRecvCallback(wslay_event_context_ptr wsctx, // TODO Only process text frame ssize_t error = 0; auto json = wsSession->parseFinal(nullptr, 0, error); - auto preauthorized = RpcRequest::MUST_AUTHORIZE; if(error < 0) { A2_LOG_INFO("Failed to parse JSON-RPC request"); RpcResponse res @@ -177,7 +176,7 @@ void onMsgRecvCallback(wslay_event_context_ptr wsctx, auto e = wsSession->getDownloadEngine(); if(jsondict) { RpcResponse res = - processJsonRpcRequest(jsondict, e, preauthorized); + processJsonRpcRequest(jsondict, e); addResponse(wsSession, res); } else { List* jsonlist = downcast(json); @@ -188,10 +187,7 @@ void onMsgRecvCallback(wslay_event_context_ptr wsctx, eoi = jsonlist->end(); i != eoi; ++i) { Dict* jsondict = downcast(*i); if (jsondict) { - auto resp = processJsonRpcRequest(jsondict, e, preauthorized); - if (resp.code == 0) { - preauthorized = RpcRequest::PREAUTHORIZED; - } + auto resp = processJsonRpcRequest(jsondict, e); results.push_back(std::move(resp)); } } -- cgit