diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a08c59..20b598e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.2) project(libravatarserv - VERSION 0.2.5 + VERSION 0.3.0 LANGUAGES CXX ) diff --git a/src/libravatarserv.cpp b/src/libravatarserv.cpp index eae2aa0..5c11886 100644 --- a/src/libravatarserv.cpp +++ b/src/libravatarserv.cpp @@ -18,6 +18,7 @@ #include #include #include +#include "version.hpp" #include "libravatarserv.hpp" using std::cout; @@ -79,7 +80,10 @@ int main() image::Image answer = image::get(digest, size); if (answer.error == 0) { - cout << "Content-type: image/png\n\n"; + 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.flush(); // We need to flush before we use /dev/stdout directly. // answer.image.write("test.png"); answer.image.write("/dev/stdout");