Bugfix: Remove file extensions from digest with no parameters in URL
All checks were successful
the build was successful
All checks were successful
the build was successful
This commit is contained in:
parent
43232d802b
commit
f793a86af2
@ -1,6 +1,6 @@
|
||||
cmake_minimum_required (VERSION 3.2)
|
||||
project(libravatarserv
|
||||
VERSION 0.4.0
|
||||
VERSION 0.4.1
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
|
15
src/http.cpp
15
src/http.cpp
@ -41,13 +41,6 @@ const Request http::parse_request(const string &request)
|
||||
|
||||
if (pos_digest != std::string::npos)
|
||||
{
|
||||
digest = digest.substr(0, pos_digest);
|
||||
pos_digest = digest.find('.');
|
||||
if (pos_digest != std::string::npos)
|
||||
{
|
||||
digest = digest.substr(0, pos_digest);
|
||||
}
|
||||
|
||||
string answer;
|
||||
{
|
||||
answer = get_parameter(request, "s");
|
||||
@ -95,6 +88,14 @@ const Request http::parse_request(const string &request)
|
||||
}
|
||||
}
|
||||
|
||||
digest = digest.substr(0, pos_digest);
|
||||
pos_digest = digest.find('.');
|
||||
if (pos_digest != std::string::npos)
|
||||
{
|
||||
digest = digest.substr(0, pos_digest);
|
||||
}
|
||||
cerr << digest << std::endl;
|
||||
|
||||
return { digest, size, fallback };
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user