Start working on build system.
This commit is contained in:
parent
4b308f6c32
commit
521486be62
88 changed files with 1065 additions and 349 deletions
|
@ -1,43 +0,0 @@
|
|||
#include "HttpParser.h"
|
||||
|
||||
#include "StringUtils.h"
|
||||
|
||||
bool HttpParser::parsePreamble(const std::string& line, HttpPreamble& preamble)
|
||||
{
|
||||
bool inPath{ false };
|
||||
bool inMethod{ true };
|
||||
bool inProtocol{ false };
|
||||
|
||||
for (const auto c : line)
|
||||
{
|
||||
if (inPath)
|
||||
{
|
||||
if (StringUtils::isSpace(c))
|
||||
{
|
||||
inPath = false;
|
||||
inMethod = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
preamble.mPath.push_back(c);
|
||||
}
|
||||
}
|
||||
else if (inMethod)
|
||||
{
|
||||
if (StringUtils::isSpace(c))
|
||||
{
|
||||
inMethod = false;
|
||||
inProtocol = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
preamble.mMethod.push_back(c);
|
||||
}
|
||||
}
|
||||
else if (inProtocol)
|
||||
{
|
||||
preamble.mVersion.push_back(c);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue