Skip to content

[FEATURE] improve sigmesgops->has_body_part description #3900

@securepii-dev

Description

@securepii-dev

I was trying to use has_body_part to identify a dtmf-relay INFO message and getting strange results where it would always pass no matter what content type it was.
I realised after reading the code that has_body_part only matches against the defined list of MIME types and silently allows application/* to match.

It would be nice to put dtmf-relay into the static list but I understand that there is only a finite number of entries on that list.

At a minimum, improve the has_body_part documentation to note that only the static list of MIME types is matched and unknown application types match the SUBTYPE_UNKNOWN.
Useful as well to note that $cT =~ "^application/dtmf-relay" as a pattern is a valid alternative (if that is true)

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions