Skip to content

Commit

Permalink
[TODO test]
Browse files Browse the repository at this point in the history
  • Loading branch information
PapaLeoneIV committed Jan 22, 2025
1 parent 25c0448 commit 713b106
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ ERROR Parser::parse(Request *request, Client *client) {
return INVALID_HEADER;
}

//TODO check section 3.2 of RFC 2616 for the correct format of the URL
// TODO: check section 3.2 of RFC 2616 for the correct format of the URL
std::string url = analyzeUrl(request->getUrl());

if (url.find_first_not_of(ALLOWED_CHARS) != std::string::npos || url.find_first_of("/") != 0) {
client->getResponse()->setStatusCode(400);
return INVALID_HEADER;
}

//TODO more checks on headers
// TODO: more checks on headers
//for reference check 9.1.1 Safe Methods of RFC 2616
//and sectiion 4.4
if(request->getMethod() == "GET" || request->getMethod() == "DELETE" /* || request->getMethod() == "HEAD" */) {
Expand Down

0 comments on commit 713b106

Please sign in to comment.