forked from tastytea/libravatarserv
Bugfix: Remove file extensions from digest with no parameters in URL
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…
Reference in New Issue
Block a user