Quick fix for the unauthorized return value for bad requests.

This commit is contained in:
Ken Moore
2016-01-05 14:46:00 -05:00
parent 6e204d19b6
commit c08a458127
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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){