Module: kamailio
Branch: master
Commit: 4072b0f9fbc084a4f4640e1b4272b7f8495cd1bb
URL:
https://github.com/kamailio/kamailio/commit/4072b0f9fbc084a4f4640e1b4272b7f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-08-17T13:42:59+02:00
core: parser - use case insensitive comparison to get header by name
- same for next sibling header
- GH #1217
---
Modified: src/core/parser/msg_parser.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4072b0f9fbc084a4f4640e1b4272b7f…
Patch:
https://github.com/kamailio/kamailio/commit/4072b0f9fbc084a4f4640e1b4272b7f…
---
diff --git a/src/core/parser/msg_parser.c b/src/core/parser/msg_parser.c
index be137652de..efad8f9f63 100644
--- a/src/core/parser/msg_parser.c
+++ b/src/core/parser/msg_parser.c
@@ -962,7 +962,7 @@ hdr_field_t* get_hdr_by_name(const sip_msg_t* const msg, const char*
const name,
for(hdr = msg->headers; hdr; hdr = hdr->next) {
if(hdr->name.len == name_len && *hdr->name.s==*name
- && strncmp(hdr->name.s, name, name_len)==0)
+ && strncasecmp(hdr->name.s, name, name_len)==0)
return hdr;
}
return NULL;
@@ -975,7 +975,7 @@ hdr_field_t* next_sibling_hdr_by_name(const hdr_field_t* const hf)
for(hdr = hf->next; hdr; hdr = hdr->next) {
if(hdr->name.len == hf->name.len && *hdr->name.s==*hf->name.s
- && strncmp(hdr->name.s, hf->name.s, hf->name.len)==0)
+ && strncasecmp(hdr->name.s, hf->name.s, hf->name.len)==0)
return hdr;
}
return NULL;