Closed neofreko closed 2 years ago
on version 3.8.1 Per w3 spec, the can be space after semicolon. Eg: audio/*; q=0.2, audio/basic
audio/*; q=0.2, audio/basic
In my case, I found it when server returns: application/json; charset=utf-8
application/json; charset=utf-8
However, current implementation fails on above example.
Probable fix: ([^\s\/]+)\/([^\s+;]+)(?:\+([^\s;]+))?((?:;\s*[^\s;=]+=(?:[^\s";=]+|"(?:[^\"]|\\.)*"))+)?
([^\s\/]+)\/([^\s+;]+)(?:\+([^\s;]+))?((?:;\s*[^\s;=]+=(?:[^\s";=]+|"(?:[^\"]|\\.)*"))+)?
You're right. Although the media range grammar doesn't show it, HTTP basic rules allow "linear white space" (LWS) between tokens and separators. Will fix soon in next release.
Fixed in release 3.8.2
on version 3.8.1 Per w3 spec, the can be space after semicolon. Eg:
audio/*; q=0.2, audio/basic
In my case, I found it when server returns:
application/json; charset=utf-8
However, current implementation fails on above example.
Probable fix:
([^\s\/]+)\/([^\s+;]+)(?:\+([^\s;]+))?((?:;\s*[^\s;=]+=(?:[^\s";=]+|"(?:[^\"]|\\.)*"))+)?