Skip to content

Commit

Permalink
Merge pull request #2709 from telefonicaid/hotfix/accept_header_less_…
Browse files Browse the repository at this point in the history
…strict

Hotfix about being less strict on Accept header
  • Loading branch information
fgalan authored Nov 24, 2016
2 parents 4129ab8 + 6193b7e commit 1b9dc62
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/lib/rest/rest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1b9dc62

Please sign in to comment.