forked from tastytea/libravatarserv
Always send server info
This commit is contained in:
parent
d9fab6928b
commit
831b3c4ac0
|
@ -32,6 +32,7 @@ fs::path global::avatar_dir = "";
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
cout << "Server: libravatarserv/" << global::version << endl;
|
||||||
const char *request = std::getenv("REQUEST_URI");
|
const char *request = std::getenv("REQUEST_URI");
|
||||||
if (request == nullptr)
|
if (request == nullptr)
|
||||||
{
|
{
|
||||||
|
@ -55,8 +56,7 @@ int main()
|
||||||
{
|
{
|
||||||
cout << "Content-type: image/png\n";
|
cout << "Content-type: image/png\n";
|
||||||
cout << "Cache-Control: max-age=86400\n";
|
cout << "Cache-Control: max-age=86400\n";
|
||||||
cout << "Connection: close\n";
|
cout << "Connection: close\n\n";
|
||||||
cout << "Server: libravatarserv/" << global::version << endl << endl;
|
|
||||||
cout.flush(); // We need to flush before we use /dev/stdout directly.
|
cout.flush(); // We need to flush before we use /dev/stdout directly.
|
||||||
answer.image.write("/dev/stdout");
|
answer.image.write("/dev/stdout");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue