I think you need to extract the extension from the argument passed to the function -- that's what it was doing before.  Issue #4575 said that we should replace _getFileExtesion with getFilenameExtension() which would keep the same behavior.  If someone passes "junk.html" to this function it will not match like it did before.  The StaticServer plugin, for instance, is calling this function without first grabbing the extension from the path name.