diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-12-27 17:36:24 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-12-27 17:36:24 -0800 |
| commit | 1fc48dc4a67503c65a040606bc00a4cac7210f13 (patch) | |
| tree | 4ea220a46b4223d75bd08405df354ff5b368018c /src/supplemental/http/http_msg.c | |
| parent | 5ff3d3d3ab82be4b2171e06f1def9cdddaef4115 (diff) | |
| download | nng-1fc48dc4a67503c65a040606bc00a4cac7210f13.tar.gz nng-1fc48dc4a67503c65a040606bc00a4cac7210f13.tar.bz2 nng-1fc48dc4a67503c65a040606bc00a4cac7210f13.zip | |
Compilation fixes for Windows.
Diffstat (limited to 'src/supplemental/http/http_msg.c')
| -rw-r--r-- | src/supplemental/http/http_msg.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/supplemental/http/http_msg.c b/src/supplemental/http/http_msg.c index 8b3c6a7c..ff931240 100644 --- a/src/supplemental/http/http_msg.c +++ b/src/supplemental/http/http_msg.c @@ -145,7 +145,7 @@ http_del_header(nni_list *hdrs, const char *key) { http_header *h; NNI_LIST_FOREACH (hdrs, h) { - if (strcasecmp(key, h->name) == 0) { + if (nni_strcasecmp(key, h->name) == 0) { nni_list_remove(hdrs, h); nni_strfree(h->name); nni_free(h->value, strlen(h->value) + 1); @@ -173,7 +173,7 @@ http_set_header(nni_list *hdrs, const char *key, const char *val) { http_header *h; NNI_LIST_FOREACH (hdrs, h) { - if (strcasecmp(key, h->name) == 0) { + if (nni_strcasecmp(key, h->name) == 0) { char * news; size_t len = strlen(val) + 1; if ((news = nni_alloc(len)) == NULL) { @@ -220,7 +220,7 @@ http_add_header(nni_list *hdrs, const char *key, const char *val) { http_header *h; NNI_LIST_FOREACH (hdrs, h) { - if (strcasecmp(key, h->name) == 0) { + if (nni_strcasecmp(key, h->name) == 0) { char * news; size_t len = strlen(h->value) + strlen(val) + 3; if ((news = nni_alloc(len)) == NULL) { @@ -267,7 +267,7 @@ http_get_header(nni_list *hdrs, const char *key) { http_header *h; NNI_LIST_FOREACH (hdrs, h) { - if (strcasecmp(h->name, key) == 0) { + if (nni_strcasecmp(h->name, key) == 0) { return (h->value); } } @@ -407,10 +407,9 @@ nni_http_res_alloc_data(nni_http_res *res, size_t size) static int http_parse_header(nni_list *hdrs, void *line) { - http_header *h; - char * key = line; - char * val; - char * end; + char *key = line; + char *val; + char *end; // Find separation between key and value if ((val = strchr(key, ':')) == NULL) { |
