diff --git a/src/http_kv.c b/src/http_kv.c index b77ab6bf..5c4e89a2 100644 --- a/src/http_kv.c +++ b/src/http_kv.c @@ -154,6 +154,11 @@ http_method_t get_http_method_key(const char *s, size_t slen) { void http_status_append(buffer * const b, const int status) { + if (200 == status) { /*(short-circuit common case)*/ + buffer_append_string_len(b, CONST_STR_LEN("200 OK")); + return; + } + const keyvalue * const kv = http_status; int i; for (i = 0; kv[i].key != status && kv[i].vlen; ++i) ;