Return 501 or redirect if "Mystery Person" is not found.
the build was successful
Details
the build was successful
Details
This commit is contained in:
parent
18b0ed6359
commit
9aa8803029
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 3.2)
|
cmake_minimum_required (VERSION 3.2)
|
||||||
project(libravatarserv
|
project(libravatarserv
|
||||||
VERSION 0.6.6
|
VERSION 0.6.7
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ using std::endl;
|
||||||
|
|
||||||
// Global variables
|
// Global variables
|
||||||
std::map<const string, const string> hash::table;
|
std::map<const string, const string> hash::table;
|
||||||
fs::path settings::avatar_dir = "";
|
fs::path settings::avatar_dir;
|
||||||
settings::Settings settings::settings;
|
settings::Settings settings::settings;
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
@ -96,8 +96,9 @@ int main()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cout << "Status: 404 Not Found\n\n";
|
|
||||||
cerr << "Error: Mystery person not found.\n";
|
cerr << "Error: Mystery person not found.\n";
|
||||||
|
// Jump to last else
|
||||||
|
goto not_implemented;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (avatar.fallback.substr(0, 9) == "identicon")
|
else if (avatar.fallback.substr(0, 9) == "identicon")
|
||||||
|
@ -116,6 +117,7 @@ int main()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
not_implemented:
|
||||||
if (settings::settings.redirect_nofallback)
|
if (settings::settings.redirect_nofallback)
|
||||||
{
|
{
|
||||||
http::send_redirect(avatar);
|
http::send_redirect(avatar);
|
||||||
|
|
Loading…
Reference in New Issue