Module: kamailio
Branch: master
Commit: 4ab6e05df56afb7802a2cd125e89b9282a1c6c85
URL:
https://github.com/kamailio/kamailio/commit/4ab6e05df56afb7802a2cd125e89b92…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-05-05T18:56:39+02:00
tm: lw parser - fix matching To header in lw_get_hf_name()
---
Modified: src/modules/tm/lw_parser.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4ab6e05df56afb7802a2cd125e89b92…
Patch:
https://github.com/kamailio/kamailio/commit/4ab6e05df56afb7802a2cd125e89b92…
---
diff --git a/src/modules/tm/lw_parser.c b/src/modules/tm/lw_parser.c
index d13ec58311..6f48304f53 100644
--- a/src/modules/tm/lw_parser.c
+++ b/src/modules/tm/lw_parser.c
@@ -188,9 +188,11 @@ char *lw_get_hf_name(char *begin, char *end, enum _hdr_types_t
*type)
case 't': /* To */
if(LOWER_BYTE(*(p + 1)) == 'o') {
- p += 2;
- *type = HDR_TO_T;
- break;
+ if((*(p + 2) == ' ') || (*(p + 2) == ':')) {
+ p += 2;
+ *type = HDR_TO_T;
+ break;
+ }
}
if((*(p + 1) == ' ') || (*(p + 1) == ':')) {
p++;