aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Ly <>
Subject Re: Review Request 65690: Make charset parsing in HTTP headers case insensitve
Date Mon, 19 Feb 2018 06:34:36 GMT

This is an automatically generated e-mail. To reply, visit:

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

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


Use 'application/json' without charset specified

Repository: aurora


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/ 2820cda42293649e02eff6122621d485cb803ac2

  src/main/java/org/apache/aurora/scheduler/http/api/ d9df96896d83786596880105968dc7fcdc0168e5

  src/test/java/org/apache/aurora/scheduler/http/api/ bfd117b4988c35c6b3f95508b2924bbd19b0c692




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


Jordan Ly

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message