-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65690/
-----------------------------------------------------------

(Updated Feb. 19, 2018, 6:34 a.m.)


Review request for Aurora, David McLaughlin, Renan DelValle, Santhosh Kumar 
Shanmugham, and Stephan Erb.


Changes
-------

Use 'application/json' without charset specified


Repository: aurora


Description
-------

Users have reported that the UI does not load in Firefox. Investigating the 
issue shows that Chrome and Safari will format charset into an uppercase 
`UTF-8` which is accepted by the servlet. However, Mozilla will leave the 
charset as lowercase `utf-8` which causes a 415 response.

Charsets should be case-insensitive but the default Java `MediaType` class does 
not take this into account when parsing/comparing. I propose switching to 
Guava's `MediaType` class which does smarter comparisons.


Diffs (updated)
-----

  src/main/java/org/apache/aurora/scheduler/http/api/ApiModule.java 
2820cda42293649e02eff6122621d485cb803ac2 
  src/main/java/org/apache/aurora/scheduler/http/api/TContentAwareServlet.java 
d9df96896d83786596880105968dc7fcdc0168e5 
  src/test/java/org/apache/aurora/scheduler/http/api/ApiIT.java 
bfd117b4988c35c6b3f95508b2924bbd19b0c692 


Diff: https://reviews.apache.org/r/65690/diff/2/

Changes: https://reviews.apache.org/r/65690/diff/1-2/


Testing
-------

`./gradlew test`
Manual testing in Safari, Chrome, and Firefox.


Thanks,

Jordan Ly

Reply via email to