mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 10:20:26 +00:00
Quick fix for the unauthorized return value for bad requests.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user