Tell IANA not to encode the RDAP base URL response (#1705)

This commit is contained in:
gbrodman 2022-07-13 14:31:16 -04:00 committed by GitHub
parent 567f77126d
commit 295c786edd
2 changed files with 3 additions and 0 deletions

View file

@ -99,6 +99,8 @@ public final class UpdateRegistrarRdapBaseUrlsAction implements Runnable {
CSVParser csv;
try {
HttpRequest request = httpTransport.createRequestFactory().buildGetRequest(RDAP_IDS_URL);
// AppEngine might insert accept-encodings for us if we use the default gzip, so remove it
request.getHeaders().setAcceptEncoding(null);
HttpResponse response = request.execute();
String csvString = new String(ByteStreams.toByteArray(response.getContent()), UTF_8);
csv =

View file

@ -98,6 +98,7 @@ public final class UpdateRegistrarRdapBaseUrlsActionTest {
private void assertCorrectRequestSent() {
assertThat(httpTransport.getRequestSent().getUrl())
.isEqualTo("https://www.iana.org/assignments/registrar-ids/registrar-ids-1.csv");
assertThat(httpTransport.getRequestSent().getHeaders().get("accept-encoding")).isNull();
}
private static void persistRegistrar(