From ec75536c114510aa8f1a33f8513e0b25bb768738 Mon Sep 17 00:00:00 2001 From: Nathan French Date: Tue, 7 Aug 2018 20:26:32 -0400 Subject: [PATCH] fixed missing exported symbols for header_(new|find) --- evhtp.c | 22 +++++++++++++++++++--- include/evhtp/evhtp.h | 3 --- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/evhtp.c b/evhtp.c index a0a77b5..6150989 100644 --- a/evhtp.c +++ b/evhtp.c @@ -3181,6 +3181,24 @@ evhtp_kv_find(evhtp_kvs_t * kvs, const char * key) return NULL; } +const char * +evhtp_header_find(evhtp_headers_t * headers, const char * key) +{ + return evhtp_kv_find(headers, key); +} + +void +evhtp_headers_add_header(evhtp_headers_t * headers, evhtp_header_t * header) +{ + return evhtp_kvs_add_kv(headers, header); +} + +evhtp_header_t * +evhtp_header_new(const char * key, const char * val, char kalloc, char valloc) +{ + return evhtp_kv_new(key, val, kalloc, valloc); +} + evhtp_kv_t * evhtp_kvs_find_kv(evhtp_kvs_t * kvs, const char * key) { @@ -5383,14 +5401,12 @@ evhtp_make_request(evhtp_connection_t * c, evhtp_request_t * r, evhtp_headers_add_header(r->headers_out, evhtp_header_new("Content-Length", out_buf, 0, 1)); } - - } evhtp_headers_for_each(r->headers_out, htp__create_headers_, obuf); evbuffer_add_reference(obuf, "\r\n", 2, NULL, NULL); - + if (evbuffer_get_length(r->buffer_out)) { evbuffer_add_buffer(obuf, r->buffer_out); } diff --git a/include/evhtp/evhtp.h b/include/evhtp/evhtp.h index 91064b3..9a66755 100644 --- a/include/evhtp/evhtp.h +++ b/include/evhtp/evhtp.h @@ -1209,15 +1209,12 @@ EVHTP_EXPORT void evhtp_headers_add_header(evhtp_headers_t * headers, evhtp_head */ EVHTP_EXPORT const char * evhtp_header_find(evhtp_headers_t * headers, const char * key); -#define evhtp_header_find evhtp_kv_find #define evhtp_headers_find_header evhtp_kvs_find_kv #define evhtp_headers_for_each evhtp_kvs_for_each -#define evhtp_header_new evhtp_kv_new #define evhtp_header_free evhtp_kv_free #define evhtp_headers_new evhtp_kvs_new #define evhtp_headers_free evhtp_kvs_free #define evhtp_header_rm_and_free evhtp_kv_rm_and_free -#define evhtp_headers_add_header evhtp_kvs_add_kv #define evhtp_headers_add_headers evhtp_kvs_add_kvs #define evhtp_query_new evhtp_kvs_new #define evhtp_query_free evhtp_kvs_free