Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
fixed missing exported symbols for header_(new|find)
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFrench committed Aug 8, 2018
1 parent a0a8641 commit ec75536
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
22 changes: 19 additions & 3 deletions evhtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);
}
Expand Down
3 changes: 0 additions & 3 deletions include/evhtp/evhtp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ec75536

Please sign in to comment.