diff options
author | Gabriel Marinho <gabrielbiga@me.com> | 2015-04-13 18:43:24 -0300 |
---|---|---|
committer | Gabriel Marinho <gabrielbiga@me.com> | 2015-04-13 18:43:24 -0300 |
commit | 100f4a7b7366fc6fc6b92426487be25af7b67a57 (patch) | |
tree | de52dd4dbee6545eacf78e807bdb01f560b72223 /include | |
parent | b7a7df0412ef0e92e1d8d4a3763a066a9b197671 (diff) | |
download | crow-100f4a7b7366fc6fc6b92426487be25af7b67a57.tar.gz crow-100f4a7b7366fc6fc6b92426487be25af7b67a57.zip |
Suggestion: Change the server name variable to a constant on settings.h
With this constant is very more easy to change the Crow server name.
Diffstat (limited to 'include')
-rw-r--r-- | include/http_server.h | 3 | ||||
-rw-r--r-- | include/settings.h | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/http_server.h b/include/http_server.h index e7d9f4f..377a939 100644 --- a/include/http_server.h +++ b/include/http_server.h @@ -12,6 +12,7 @@ #include "http_connection.h" #include "logging.h" #include "dumb_timer_queue.h" +#include "settings.h" namespace crow { @@ -162,7 +163,7 @@ namespace crow Handler* handler_; uint16_t concurrency_{1}; - std::string server_name_ = "Crow/0.1"; + std::string server_name_ = CROW_SERVER_NAME; uint16_t port_; unsigned int roundrobin_index_{}; diff --git a/include/settings.h b/include/settings.h index 31a39e3..fcccd56 100644 --- a/include/settings.h +++ b/include/settings.h @@ -2,6 +2,9 @@ // settings for crow // TODO - replace with runtime config. libucl? +// Server Name +#define CROW_SERVER_NAME "Crow/0.1" + /* #ifdef - enables debug mode */ #define CROW_ENABLE_DEBUG |