Remove file extensions from digests.

Gravatar supports file extensions, so we might come across them.
This commit is contained in:
tastytea 2018-11-27 04:22:21 +01:00
parent 13a71f0315
commit ed83a9c4a8
Signed by untrusted user: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.2)
project(libravatarserv
VERSION 0.3.1
VERSION 0.3.2
LANGUAGES CXX
)

View File

@ -42,6 +42,11 @@ 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;
{