diff --git a/src/server/RestStructs.h b/src/server/RestStructs.h index f0a84f2..81359e7 100644 --- a/src/server/RestStructs.h +++ b/src/server/RestStructs.h @@ -28,7 +28,7 @@ public: //REST Variables QString VERB, URI, HTTPVERSION; //JSON input variables - QString name, namesp, id; + QString name, namesp, id, auth; QJsonValue args; //Raw Text QStringList Header; //REST Headers @@ -48,6 +48,7 @@ public: URI = line.section(" ",1,1); HTTPVERSION = line.section(" ",2,2); Body = message.remove(Header.join("\n")+"\n"); //chop the headers off the front + //if(Header.filter( } //Now Parse out the Body into the JSON fields and/or arguments structure Body = Body.simplified(); //remove any extra whitespace on the beginning/end diff --git a/src/server/WebSocket.cpp b/src/server/WebSocket.cpp index bf7b00a..51c5805 100644 --- a/src/server/WebSocket.cpp +++ b/src/server/WebSocket.cpp @@ -205,7 +205,7 @@ void WebSocket::EvaluateRequest(const RestInputStruct &REQ){ out.out_args = outargs; }else{ //Error in inputs - assemble the return error message - out.CODE = RestOutputStruct::BADREQUEST; + out.CODE = RestOutputStruct::UNAUTHORIZED; } //If this is a REST input - go ahead and format the output header if(out.CODE == RestOutputStruct::OK){