Always send server info

This commit is contained in:
tastytea 2018-11-26 05:00:57 +01:00
parent d9fab6928b
commit 831b3c4ac0
Signed by untrusted user: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 2 additions and 2 deletions

View File

@ -32,6 +32,7 @@ fs::path global::avatar_dir = "";
int main()
{
cout << "Server: libravatarserv/" << global::version << endl;
const char *request = std::getenv("REQUEST_URI");
if (request == nullptr)
{
@ -55,8 +56,7 @@ int main()
{
cout << "Content-type: image/png\n";
cout << "Cache-Control: max-age=86400\n";
cout << "Connection: close\n";
cout << "Server: libravatarserv/" << global::version << endl << endl;
cout << "Connection: close\n\n";
cout.flush(); // We need to flush before we use /dev/stdout directly.
answer.image.write("/dev/stdout");
}