MimeType compareTo implementation is not compatible with equals [SPR-16458] #21003
Labels
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Aliaksandr Kazlou opened SPR-16458 and commented
Not sure, it this is by design or a bug. But in the
MimeType::equals
there is a special check for thecharset
parameter, i.e.While in the
MimeType::compareTo
method it doesn't handlecharset
parameter any how specific, so simple string comparison is done then.So, the possible issue is that
equals
will produce true when comparingapplication/json;charset=UTF-8
andapplication/json;charset=utf-8
, whilecompareTo
will return "false".Affects: 4.3.14, 5.0.3
Issue Links:
Backported to: 4.3.15
The text was updated successfully, but these errors were encountered: