@ -264,7 +264,7 @@ public class MediaType implements Comparable<MediaType> {
@@ -264,7 +264,7 @@ public class MediaType implements Comparable<MediaType> {
Stringattribute=entry.getKey();
Stringvalue=entry.getValue();
checkParameters(attribute,value);
m.put(attribute,value);
m.put(attribute,unquote(value));
}
this.parameters=Collections.unmodifiableMap(m);
}
@ -293,10 +293,12 @@ public class MediaType implements Comparable<MediaType> {
@@ -293,10 +293,12 @@ public class MediaType implements Comparable<MediaType> {
Assert.hasLength(value,"parameter value must not be empty");
checkToken(attribute);
if(PARAM_QUALITY_FACTOR.equals(attribute)){
value=unquote(value);
doubled=Double.parseDouble(value);
Assert.isTrue(d>=0D&&d<=1D,"Invalid quality value \""+value+"\": should be between 0.0 and 1.0");
}
elseif(PARAM_CHARSET.equals(attribute)){
value=unquote(value);
Charset.forName(value);
}
elseif(!isQuotedString(value)){
@ -308,6 +310,13 @@ public class MediaType implements Comparable<MediaType> {
@@ -308,6 +310,13 @@ public class MediaType implements Comparable<MediaType> {