wenhao001 / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

Strip quotes from attribute values if present in Content-Type header #413

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1. have a method/URL that answers with: Content-Type <TYPE>; charset="UTF-8"
2. call this method/URL with REST assured

Because the string ""UTF-8"" (with the quotes) will be treated literally no 
Charset can be found in Java, which results in an UnsupportedEncodingException. 
Since the HTTP specific states in chapter 3.6 that parameters can be a quoted 
string, REST assured should ignore/strip them.

This problem could be observed with REST assured 1.8.1 and 2.4.1 in combination 
with RESTEasy  2.3.5 and JUnit 4.11 on Linux Minut 17.1

You can see that findCharset() and asString() in RestAssuredResponseImpl streat 
the charset String literally.

Original issue reported on code.google.com by r.braeun...@gmail.com on 25 Jun 2015 at 5:55

GoogleCodeExporter commented 8 years ago

Original comment by johan.ha...@gmail.com on 27 Jun 2015 at 5:00