-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65761/#review198375
-----------------------------------------------------------
Tested on incognito window in Chrome 64, private window in Firefox 58, and
private window in Safari 11.0.3. Used incognito/private windows to avoid
javascript caches influencing outcome.
Only thing I would change in this patch is modifying
`testThriftJsonUtf8Accepted` in
`org/apache/aurora/scheduler/http/api/ApiIT.java` to something like:
```
String upperUTF8 = StandardCharsets.UTF_8.name().toUpperCase();
String lowerUTF8 = StandardCharsets.UTF_8.name().toLowerCase();
// We also want to ensure charset parsing is case-insensitive because
different browsers have
// different default behaviors (Chrome and Safari will change charset to
all uppercase, while
// Firefox may leave it lowercase.
ClientResponse upperCaseUTF = getPlainRequestBuilder(ApiModule.API_PATH)
.type("application/vnd.apache.thrift.json; charset=" + upperUTF8)
.accept("application/vnd.apache.thrift.json; charset=" + upperUTF8)
.post(ClientResponse.class, JSON_FIXTURE);
assertEquals(SC_OK, upperCaseUTF.getStatus());
assertEquals(
"application/vnd.apache.thrift.json",
upperCaseUTF.getHeaders().getFirst(CONTENT_TYPE));
ClientResponse lowerCaseUTF = getPlainRequestBuilder(ApiModule.API_PATH)
.type("application/vnd.apache.thrift.json; charset=" + lowerUTF8)
.accept("application/vnd.apache.thrift.json; charset=" + lowerUTF8)
```
just so we are basing our test on something we depend on in the main source.
Other than that looks good to me!
- Renan DelValle
On Feb. 22, 2018, 3:23 p.m., Jordan Ly wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65761/
> -----------------------------------------------------------
>
> (Updated Feb. 22, 2018, 3:23 p.m.)
>
>
> Review request for Aurora and Renan DelValle.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> Minor nit, use the StandardCharset constant for UTF-8 as opposed to creating
> it ourselves.
>
>
> Diffs
> -----
>
> src/main/java/org/apache/aurora/scheduler/http/api/ApiModule.java
> 09950a77427c7ed94090a036ae26dae2939aa2c1
>
>
> Diff: https://reviews.apache.org/r/65761/diff/1/
>
>
> Testing
> -------
>
> `./gradlew test`
>
> Manually verified Firefox, Chrome, and Safari.
>
>
> Thanks,
>
> Jordan Ly
>
>