diff --git a/src/lib/rest/rest.cpp b/src/lib/rest/rest.cpp index e306400cc4..27bbdc9020 100644 --- a/src/lib/rest/rest.cpp +++ b/src/lib/rest/rest.cpp @@ -463,6 +463,16 @@ static void acceptParse(ConnectionInfo* ciP, const char* value) ++cP; } + // + // HOTFIX for release 1.4.0 + // If that comma is the LAST char in the string - ACCEPT + // + if (*cP == 0) + { + LM_W(("Invalid Accept Header: ending in comma")); + return; + } + acceptItemParse(ciP, itemStart); itemStart = cP; }