media types in HTTP Accept headers can be parsed with single quotes (-> Android 2.x)
Issue: SPR-9734
This commit is contained in:
@@ -376,7 +376,12 @@ public class MediaType implements Comparable<MediaType> {
|
||||
}
|
||||
|
||||
private boolean isQuotedString(String s) {
|
||||
return s.length() > 1 && s.startsWith("\"") && s.endsWith("\"") ;
|
||||
if (s.length() < 2) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return ((s.startsWith("\"") && s.endsWith("\"")) || (s.startsWith("'") && s.endsWith("'")));
|
||||
}
|
||||
}
|
||||
|
||||
private String unquote(String s) {
|
||||
|
||||
Reference in New Issue
Block a user