mirror of
https://github.com/drogonframework/drogon.git
synced 2025-07-17 00:00:35 -04:00
Compare commits
No commits in common. "d3dbaed60a152a6f9333d3ec6b23f0d1849db11a" and "3fa480dd87eab39de0cb292687ee4f36611906c6" have entirely different histories.
d3dbaed60a
...
3fa480dd87
4
build.sh
4
build.sh
@ -92,9 +92,9 @@ else
|
||||
make_flags="$make_flags -j$parallel"
|
||||
fi
|
||||
|
||||
if [ "X$1" = "X-t" ]; then
|
||||
if [ "$1" = "-t" ]; then
|
||||
build_drogon 1
|
||||
elif [ "X$1" = "X-tshared" ]; then
|
||||
elif [ "$1" = "-tshared" ]; then
|
||||
build_drogon 2
|
||||
else
|
||||
build_drogon 0
|
||||
|
@ -56,25 +56,15 @@ bool HttpRequestParser::processRequestLine(const char *begin, const char *end)
|
||||
const char *space = std::find(start, end, ' ');
|
||||
if (space != end)
|
||||
{
|
||||
const char *slash = std::find(start, space, '/');
|
||||
if (slash != start && slash + 1 < space && *(slash + 1) == '/')
|
||||
const char *question = std::find(start, space, '?');
|
||||
if (question != space)
|
||||
{
|
||||
// scheme precedents
|
||||
slash = std::find(slash + 2, space, '/');
|
||||
}
|
||||
const char *question = std::find(slash, space, '?');
|
||||
if (slash != space)
|
||||
{
|
||||
request_->setPath(slash, question);
|
||||
request_->setPath(start, question);
|
||||
request_->setQuery(question + 1, space);
|
||||
}
|
||||
else
|
||||
{
|
||||
// An empty abs_path is equivalent to an abs_path of "/"
|
||||
request_->setPath("/");
|
||||
}
|
||||
if (question != space)
|
||||
{
|
||||
request_->setQuery(question + 1, space);
|
||||
request_->setPath(start, space);
|
||||
}
|
||||
start = space + 1;
|
||||
succeed = end - start == 8 && std::equal(start, end - 1, "HTTP/1.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user