Module: kamailio Branch: master Commit: 7135feee9cdc93efa8c0c3e4abf24a9335ce42de URL: https://github.com/kamailio/kamailio/commit/7135feee9cdc93efa8c0c3e4abf24a9335ce42de
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2020-07-16T09:09:48+02:00 core: parser - trim trailing whitespaces in header name --- Modified: src/core/parser/parse_hname2.c --- Diff: https://github.com/kamailio/kamailio/commit/7135feee9cdc93efa8c0c3e4abf24a9335ce42de.diff Patch: https://github.com/kamailio/kamailio/commit/7135feee9cdc93efa8c0c3e4abf24a9335ce42de.patch --- diff --git a/src/core/parser/parse_hname2.c b/src/core/parser/parse_hname2.c index 9db38afbca..58c833e55f 100644 --- a/src/core/parser/parse_hname2.c +++ b/src/core/parser/parse_hname2.c @@ -27,9 +27,10 @@ */ #include "../comp_defs.h" +#include "../trim.h" +#include "../ut.h" /* q_memchr */ #include "parse_hname2.h" #include "keys.h" -#include "../ut.h" /* q_memchr */ #define LOWER_BYTE(b) ((b) | 0x20) #define LOWER_DWORD(d) ((d) | 0x20202020) @@ -238,6 +239,7 @@ char* parse_hname2(char* const begin, const char* const end, struct hdr_field* c goto other; } else { hdr->name.len = p - hdr->name.s; + trim_trailing(&hdr->name); return (p + 1); } @@ -252,6 +254,7 @@ char* parse_hname2(char* const begin, const char* const end, struct hdr_field* c } else { hdr->type = HDR_OTHER_T; hdr->name.len = p - hdr->name.s; + trim_trailing(&hdr->name); /*hdr_update_type(hdr);*/ return (p + 1); } _______________________________________________ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev