Module: kamailio
Branch: 5.4
Commit: 0572c8192d26702fc0ac21ae76cbf81fbad91126
URL:
https://github.com/kamailio/kamailio/commit/0572c8192d26702fc0ac21ae76cbf81…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-05-05T18:57:57+02:00
tm: lw parser - fix matching To header in lw_get_hf_name()
(cherry picked from commit 4ab6e05df56afb7802a2cd125e89b9282a1c6c85)
(cherry picked from commit 33db4ffc558b7a9d4c291c929b9e73b3cf8b16f0)
---
Modified: src/modules/tm/lw_parser.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0572c8192d26702fc0ac21ae76cbf81…
Patch:
https://github.com/kamailio/kamailio/commit/0572c8192d26702fc0ac21ae76cbf81…
---
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++;