kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 0f28b4a62def5114e0ca17be304f532e2088c08e
parent f0fc1af9402a4d40eaad3ce1a984f40ad6ec9a86
Author: Joris Vink <joris@coders.se>
Date:   Tue, 10 Dec 2013 16:43:19 +0100

Enter versioning, starting at 1.0-current

Diffstat:
includes/kore.h | 3+++
src/http.c | 10++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/includes/kore.h b/includes/kore.h @@ -40,6 +40,9 @@ #define KORE_RESULT_RETRY 2 #define KORE_NAME_STRING "kore" +#define KORE_VERSION_MAJOR 1 +#define KORE_VERSION_MINOR 0 +#define KORE_VERSION_STATE "current" #define errno_s strerror(errno) #define ssl_errno_s ERR_error_string(ERR_get_error(), NULL) diff --git a/src/http.c b/src/http.c @@ -270,7 +270,11 @@ http_response(struct http_request *req, int status, u_int8_t *d, u_int32_t len) hblock = spdy_header_block_create(SPDY_HBLOCK_NORMAL); spdy_header_block_add(hblock, ":status", sbuf); spdy_header_block_add(hblock, ":version", "HTTP/1.1"); - spdy_header_block_add(hblock, ":server", KORE_NAME_STRING); + + snprintf(sbuf, sizeof(sbuf), "%s (%d.%d-%s)", + KORE_NAME_STRING, KORE_VERSION_MAJOR, KORE_VERSION_MINOR, + KORE_VERSION_STATE); + spdy_header_block_add(hblock, ":server", sbuf); if (http_hsts_enable) { snprintf(sbuf, sizeof(sbuf), @@ -309,7 +313,9 @@ http_response(struct http_request *req, int status, u_int8_t *d, u_int32_t len) kore_buf_appendf(buf, "HTTP/1.1 %d %s\r\n", status, http_status_text(status)); kore_buf_appendf(buf, "Content-length: %d\r\n", len); - kore_buf_appendf(buf, "Server: %s\r\n", KORE_NAME_STRING); + kore_buf_appendf(buf, "Server: %s (%d.%d-%s)\r\n", + KORE_NAME_STRING, KORE_VERSION_MAJOR, KORE_VERSION_MINOR, + KORE_VERSION_STATE); if (http_keepalive_time) { kore_buf_appendf(buf, "Connection: keep-alive\r\n");