mirror of
https://github.com/google/nomulus.git
synced 2025-04-30 12:07:51 +02:00
Tell IANA not to encode the RDAP base URL response (#1705)
This commit is contained in:
parent
567f77126d
commit
295c786edd
2 changed files with 3 additions and 0 deletions
|
@ -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 =
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Add table
Reference in a new issue