Actions
Bug #4001
closedosmo-mgw: Make sure non-sdp MGCP text is handled case-insensitive
Start date:
05/14/2019
Due date:
% Done:
100%
Spec Reference:
Description
MGCP RFC 3435 (https://tools.ietf.org/html/rfc3435) states almost all text has to be handled in a case-insensitive way, except SDP parts:
Commands and responses SHALL be encoded in accordance with the grammar, which, per RFC 2234, is case-insensitive except for the SDP part.
And even more explicitly in 3.2 section:
Unless otherwise noted or dictated by other referenced standards (e.g., SDP), each component in the command header is case insensitive. This goes for verbs as well as parameters and values, and hence all comparisons MUST treat upper and lower case as well as combinations of these as being equal.
However, grepping for "casecmp" (str{n}casecmp) in osmo-mgw shows almost no use:
$ ag casecmp src/libosmo-mgcp/mgcp_codec.c 287: if (strcasecmp(codec_name, codec->subtype_name) == 0)
While grepping for str{n}cmp shows a lot more use. That means we need o switch to str{n}casecmp in some of them.
Actions