diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2018-09-23 19:15:52 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2018-09-23 19:18:47 -0400 |
commit | b61ed6da2a4324cd562c3c5ec698f70ced4806b6 (patch) | |
tree | d8e0302a53ded3593e6387fa7703d0bf8351f66e /src/http_kv.c | |
parent | 90c30d5e90a0eb1aedeebec905c468abce72d46f (diff) | |
download | lighttpd-git-b61ed6da2a4324cd562c3c5ec698f70ced4806b6.tar.gz |
[core] http_method_append()
Diffstat (limited to 'src/http_kv.c')
-rw-r--r-- | src/http_kv.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/http_kv.c b/src/http_kv.c index c470661b..2ddbf7da 100644 --- a/src/http_kv.c +++ b/src/http_kv.c @@ -165,3 +165,12 @@ void http_status_append(buffer * const b, const int status) { buffer_append_string_len(b, CONST_STR_LEN(" ")); } } + +void http_method_append(buffer * const b, const http_method_t method) { + const keyvalue * const kv = http_methods; + int i; + for (i = 0; kv[i].key != method && kv[i].value; ++i) ; + if (kv[i].value) { + buffer_append_string_len(b, kv[i].value, kv[i].vlen); + } +} |