Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make get_hdr_by_name/next_sibling_hdr_by_name case insensitive #1217

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core/parser/msg_parser.c
Expand Up @@ -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;
Expand All @@ -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;
Expand Down