-
-
Notifications
You must be signed in to change notification settings - Fork 474
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issuean issue suitable to start contributing to the projectan issue suitable to start contributing to the project
Description
i am sending this request
--d7585ab0-0284-4921-8ed3-dc9c8f6dc4cf
Content-Type: text/plain
Content-Disposition: form-data; name=password
5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8
--d7585ab0-0284-4921-8ed3-dc9c8f6dc4cf--
to it and it just hangs a response is never sent back
my code is the following
void Site::auth(const crow::request& req, crow::response& resp)
{
CROW_LOG_INFO << "Login Attempt";
crow::multipart::message msg(req);
if(msg.parts[0].body == this->password)
{
resp.code = 303;
resp.set_header("location", "/dashboard");
resp.add_header("set-cookie", Cookie::generateCookie().toString());
resp.end();
return;
}
else
{
resp.code = 401;
resp.body = "Failed login attempt";
resp.end();
return;
}
}
it works just fine with these requests
------WebKitFormBoundaryBBQ4YQVHhK9X3slD
Content-Disposition: form-data; name="password"
5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8
------WebKitFormBoundaryBBQ4YQVHhK9X3slD--
--f30a8d38-420a-44e4-84b9-a2e136cb068e
Content-Disposition: form-data; name="password"
Content-Length: 64
5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8
--f30a8d38-420a-44e4-84b9-a2e136cb068e--
i tested both crow::multipart::message
and msg.parts[0].body
and i concluded that it hangs on the crow::multipart::message
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issuean issue suitable to start contributing to the projectan issue suitable to start contributing to the project