Module: sems
Branch: master
Commit: 964f35cef2a41478c9313bceef8fb3a8767e78aa
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=964f35cef2a41478c9313bceef8fb3a8767e78aa

Author: Szókovács Róbert <[email protected]>
Committer: Szókovács Róbert <[email protected]>
Date:   Wed Nov  6 09:45:03 2013 +0100

core: b/f: make get_header_keyvalue_single() case-insensitive
as specified in RFC3261 7.3.1

---

 core/AmUtils.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/AmUtils.cpp b/core/AmUtils.cpp
index a56ea03..b87b766 100644
--- a/core/AmUtils.cpp
+++ b/core/AmUtils.cpp
@@ -725,7 +725,7 @@ string get_header_keyvalue_single(const string& param_hdr, 
const string& name) {
       case ';': // semicolons before the key
        break;
       default:
-       if (curr==name[0]) {
+       if (curr==tolower(name[0]) || curr==toupper(name[0])) {
          if (name.length() == 1)
            st = ST_FINDEQ;
          else
@@ -739,7 +739,7 @@ string get_header_keyvalue_single(const string& param_hdr, 
const string& name) {
     } break;
 
     case ST_CMPKEY: {
-       if (curr==name[corr]) {
+       if (curr==tolower(name[corr]) || curr==toupper(name[corr])) {
          corr++;
          if (corr == name.length()) {
            st = ST_FINDEQ;

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to