Closed kevinprotoss closed 10 years ago
Hello,
I found a bug of your regex.
If I give some additional attribute in the accept header like the following, the header can not be correctly parsed. e.g.,
accept
application/xhtml+xml;profile="http://www.wapforum.org/xhtml"
The result of regex match is:
type = application/xhtml+xml;profile="http://www.wapforum.org subtype = xhtml"
Of course, it must not happen. However, if a whitespace exists before the attribute, then regex works correctly again.
application/xhtml+xml; profile="http://www.wapforum.org/xhtml"
Best regards, Kevin
Thanks Kevin, this commit https://github.com/federomero/negotiator/commit/d5e20863223bdaf3ee353711afbaf7ff82fafcbf fixes that.
Hello,
I found a bug of your regex.
If I give some additional attribute in the
accept
header like the following, the header can not be correctly parsed. e.g.,The result of regex match is:
Of course, it must not happen. However, if a whitespace exists before the attribute, then regex works correctly again.
Best regards, Kevin