diff --git a/java/google/registry/config/RegistryConfig.java b/java/google/registry/config/RegistryConfig.java index 160896cf1..928dad082 100644 --- a/java/google/registry/config/RegistryConfig.java +++ b/java/google/registry/config/RegistryConfig.java @@ -761,17 +761,6 @@ public final class RegistryConfig { return 100; } - /** - * Base for RDAP link paths. - * - * @see google.registry.rdap.RdapActionBase - */ - @Provides - @Config("rdapLinkBase") - public static String provideRdapLinkBase(RegistryConfigSettings config) { - return config.rdap.baseUrl; - } - /** * WHOIS server displayed in RDAP query responses. As per Gustavo Lozano of ICANN, this should * be omitted, but the ICANN operational profile doesn't actually say that, so it's good to have diff --git a/java/google/registry/config/RegistryConfigSettings.java b/java/google/registry/config/RegistryConfigSettings.java index 742ac3183..0a3e5060b 100644 --- a/java/google/registry/config/RegistryConfigSettings.java +++ b/java/google/registry/config/RegistryConfigSettings.java @@ -32,7 +32,6 @@ public class RegistryConfigSettings { public RegistrarConsole registrarConsole; public Monitoring monitoring; public Misc misc; - public Rdap rdap; public Braintree braintree; public Kms kms; public RegistryTool registryTool; @@ -148,11 +147,6 @@ public class RegistryConfigSettings { public String sheetExportId; } - /** Configuration for RDAP. */ - public static class Rdap { - public String baseUrl; - } - /** Configuration for Braintree credit card payment processing. */ public static class Braintree { public String merchantId; diff --git a/java/google/registry/config/files/default-config.yaml b/java/google/registry/config/files/default-config.yaml index 5d12a67b0..63c63d045 100644 --- a/java/google/registry/config/files/default-config.yaml +++ b/java/google/registry/config/files/default-config.yaml @@ -215,10 +215,6 @@ misc: # to. Leave this null to disable syncing. sheetExportId: null -rdap: - # Base URL (with trailing slash) for RDAP links. - baseUrl: http://domain-registry.example/rdap/ - # Braintree is a credit card payment processor that is used on the registrar # console to allow registrars to pay their invoices. braintree: diff --git a/java/google/registry/config/files/nomulus-config-production-sample.yaml b/java/google/registry/config/files/nomulus-config-production-sample.yaml index 3493738b3..2ed7037ef 100644 --- a/java/google/registry/config/files/nomulus-config-production-sample.yaml +++ b/java/google/registry/config/files/nomulus-config-production-sample.yaml @@ -58,9 +58,6 @@ registrarConsole: misc: sheetExportId: placeholder -rdap: - baseUrl: placeholder - # You only need to specify this section if using Braintree. braintree: merchantId: placeholder diff --git a/java/google/registry/rdap/RdapActionBase.java b/java/google/registry/rdap/RdapActionBase.java index b27a1e246..e2d28a23c 100644 --- a/java/google/registry/rdap/RdapActionBase.java +++ b/java/google/registry/rdap/RdapActionBase.java @@ -35,6 +35,7 @@ import google.registry.model.EppResource; import google.registry.model.registrar.Registrar; import google.registry.rdap.RdapSearchResults.IncompletenessWarningType; import google.registry.request.Action; +import google.registry.request.FullServletPath; import google.registry.request.HttpException; import google.registry.request.HttpException.UnprocessableEntityException; import google.registry.request.Parameter; @@ -79,12 +80,12 @@ public abstract class RdapActionBase implements Runnable { @Inject Response response; @Inject @RequestMethod Action.Method requestMethod; @Inject @RequestPath String requestPath; + @Inject @FullServletPath String fullServletPath; @Inject AuthResult authResult; @Inject SessionUtils sessionUtils; @Inject RdapJsonFormatter rdapJsonFormatter; @Inject @Parameter("registrar") Optional registrarParam; @Inject @Parameter("includeDeleted") Optional includeDeletedParam; - @Inject @Config("rdapLinkBase") String rdapLinkBase; @Inject @Config("rdapWhoisServer") @Nullable String rdapWhoisServer; @Inject @Config("rdapResultSetMaxSize") int rdapResultSetMaxSize; @@ -103,11 +104,10 @@ public abstract class RdapActionBase implements Runnable { * building a map, to make sure that the request would return a 500 status if it were * invoked using GET. So this field should usually be ignored, unless there's some * expensive task required to create the map which will never result in a request failure. - * @param linkBase the base URL for RDAP link structures * @return A map (probably containing nested maps and lists) with the final JSON response data. */ abstract ImmutableMap getJsonObjectForResource( - String pathSearchString, boolean isHeadRequest, String linkBase); + String pathSearchString, boolean isHeadRequest); @Override public void run() { @@ -124,9 +124,7 @@ public abstract class RdapActionBase implements Runnable { "%s doesn't start with %s", pathProper, getActionPath()); ImmutableMap rdapJson = getJsonObjectForResource( - pathProper.substring(getActionPath().length()), - requestMethod == Action.Method.HEAD, - rdapLinkBase); + pathProper.substring(getActionPath().length()), requestMethod == Action.Method.HEAD); response.setStatus(SC_OK); response.setContentType(RESPONSE_MEDIA_TYPE); if (requestMethod != Action.Method.HEAD) { diff --git a/java/google/registry/rdap/RdapAutnumAction.java b/java/google/registry/rdap/RdapAutnumAction.java index 600a40f1f..48a163220 100644 --- a/java/google/registry/rdap/RdapAutnumAction.java +++ b/java/google/registry/rdap/RdapAutnumAction.java @@ -53,7 +53,7 @@ public class RdapAutnumAction extends RdapActionBase { @Override public ImmutableMap getJsonObjectForResource( - String pathSearchString, boolean isHeadRequest, String linkBase) { + String pathSearchString, boolean isHeadRequest) { throw new NotImplementedException("Domain Name Registry information only"); } } diff --git a/java/google/registry/rdap/RdapDomainAction.java b/java/google/registry/rdap/RdapDomainAction.java index c8ae1eee4..ce170d9e0 100644 --- a/java/google/registry/rdap/RdapDomainAction.java +++ b/java/google/registry/rdap/RdapDomainAction.java @@ -58,7 +58,7 @@ public class RdapDomainAction extends RdapActionBase { @Override public ImmutableMap getJsonObjectForResource( - String pathSearchString, boolean isHeadRequest, String linkBase) { + String pathSearchString, boolean isHeadRequest) { DateTime now = clock.nowUtc(); pathSearchString = canonicalizeName(pathSearchString); try { @@ -79,7 +79,7 @@ public class RdapDomainAction extends RdapActionBase { return rdapJsonFormatter.makeRdapJsonForDomain( domainResource, true, - rdapLinkBase, + fullServletPath, rdapWhoisServer, now, OutputDataType.FULL, diff --git a/java/google/registry/rdap/RdapDomainSearchAction.java b/java/google/registry/rdap/RdapDomainSearchAction.java index 40ad7d96f..cdacc2f16 100644 --- a/java/google/registry/rdap/RdapDomainSearchAction.java +++ b/java/google/registry/rdap/RdapDomainSearchAction.java @@ -100,7 +100,7 @@ public class RdapDomainSearchAction extends RdapActionBase { */ @Override public ImmutableMap getJsonObjectForResource( - String pathSearchString, boolean isHeadRequest, String linkBase) { + String pathSearchString, boolean isHeadRequest) { DateTime now = clock.nowUtc(); // RDAP syntax example: /rdap/domains?name=exam*.com. // The pathSearchString is not used by search commands. @@ -151,7 +151,7 @@ public class RdapDomainSearchAction extends RdapActionBase { BoilerplateType.DOMAIN, results.getIncompletenessWarnings(), ImmutableList.>of(), - rdapLinkBase); + fullServletPath); return builder.build(); } @@ -497,7 +497,7 @@ public class RdapDomainSearchAction extends RdapActionBase { for (DomainResource domain : domains) { jsonList.add( rdapJsonFormatter.makeRdapJsonForDomain( - domain, false, rdapLinkBase, rdapWhoisServer, now, outputDataType, authorization)); + domain, false, fullServletPath, rdapWhoisServer, now, outputDataType, authorization)); if (jsonList.size() >= rdapResultSetMaxSize) { break; } diff --git a/java/google/registry/rdap/RdapEntityAction.java b/java/google/registry/rdap/RdapEntityAction.java index 0ab3b67fa..7d52c3044 100644 --- a/java/google/registry/rdap/RdapEntityAction.java +++ b/java/google/registry/rdap/RdapEntityAction.java @@ -73,7 +73,7 @@ public class RdapEntityAction extends RdapActionBase { @Override public ImmutableMap getJsonObjectForResource( - String pathSearchString, boolean isHeadRequest, String linkBase) { + String pathSearchString, boolean isHeadRequest) { DateTime now = clock.nowUtc(); // The query string is not used; the RDAP syntax is /rdap/entity/handle (the handle is the roid // for contacts and the client identifier for registrars). Since RDAP's concept of an entity @@ -90,7 +90,7 @@ public class RdapEntityAction extends RdapActionBase { contactResource, true, Optional.empty(), - rdapLinkBase, + fullServletPath, rdapWhoisServer, now, OutputDataType.FULL, @@ -103,7 +103,7 @@ public class RdapEntityAction extends RdapActionBase { Optional registrar = getRegistrarByIanaIdentifier(ianaIdentifier); if (registrar.isPresent() && shouldBeVisible(registrar.get())) { return rdapJsonFormatter.makeRdapJsonForRegistrar( - registrar.get(), true, rdapLinkBase, rdapWhoisServer, now, OutputDataType.FULL); + registrar.get(), true, fullServletPath, rdapWhoisServer, now, OutputDataType.FULL); } } // At this point, we have failed to find either a contact or a registrar. diff --git a/java/google/registry/rdap/RdapEntitySearchAction.java b/java/google/registry/rdap/RdapEntitySearchAction.java index 079996f80..780e27336 100644 --- a/java/google/registry/rdap/RdapEntitySearchAction.java +++ b/java/google/registry/rdap/RdapEntitySearchAction.java @@ -84,7 +84,7 @@ public class RdapEntitySearchAction extends RdapActionBase { /** Parses the parameters and calls the appropriate search function. */ @Override public ImmutableMap getJsonObjectForResource( - String pathSearchString, boolean isHeadRequest, String linkBase) { + String pathSearchString, boolean isHeadRequest) { DateTime now = clock.nowUtc(); // RDAP syntax example: /rdap/entities?fn=Bobby%20Joe*. // The pathSearchString is not used by search commands. @@ -114,7 +114,7 @@ public class RdapEntitySearchAction extends RdapActionBase { BoilerplateType.ENTITY, results.getIncompletenessWarnings(), ImmutableList.>of(), - rdapLinkBase); + fullServletPath); return jsonBuilder.build(); } @@ -313,7 +313,7 @@ public class RdapEntitySearchAction extends RdapActionBase { contact, false, Optional.empty(), - rdapLinkBase, + fullServletPath, rdapWhoisServer, now, outputDataType, @@ -325,7 +325,7 @@ public class RdapEntitySearchAction extends RdapActionBase { ImmutableList.copyOf(jsonOutputList), IncompletenessWarningType.TRUNCATED); } jsonOutputList.add(rdapJsonFormatter.makeRdapJsonForRegistrar( - registrar, false, rdapLinkBase, rdapWhoisServer, now, outputDataType)); + registrar, false, fullServletPath, rdapWhoisServer, now, outputDataType)); } return RdapSearchResults.create( ImmutableList.copyOf(jsonOutputList), diff --git a/java/google/registry/rdap/RdapHelpAction.java b/java/google/registry/rdap/RdapHelpAction.java index abde91d06..939fa4d08 100644 --- a/java/google/registry/rdap/RdapHelpAction.java +++ b/java/google/registry/rdap/RdapHelpAction.java @@ -51,16 +51,16 @@ public class RdapHelpAction extends RdapActionBase { @Override public ImmutableMap getJsonObjectForResource( - String pathSearchString, boolean isHeadRequest, String linkBase) { + String pathSearchString, boolean isHeadRequest) { // We rely on addTopLevelEntries to notice if we are sending the TOS notice, and not add a // duplicate boilerplate entry. ImmutableMap.Builder builder = new ImmutableMap.Builder<>(); rdapJsonFormatter.addTopLevelEntries( builder, BoilerplateType.OTHER, - ImmutableList.of(rdapJsonFormatter.getJsonHelpNotice(pathSearchString, rdapLinkBase)), + ImmutableList.of(rdapJsonFormatter.getJsonHelpNotice(pathSearchString, fullServletPath)), ImmutableList.>of(), - rdapLinkBase); + fullServletPath); return builder.build(); } } diff --git a/java/google/registry/rdap/RdapIpAction.java b/java/google/registry/rdap/RdapIpAction.java index 255ef954e..8bfc71845 100644 --- a/java/google/registry/rdap/RdapIpAction.java +++ b/java/google/registry/rdap/RdapIpAction.java @@ -53,7 +53,7 @@ public class RdapIpAction extends RdapActionBase { @Override public ImmutableMap getJsonObjectForResource( - String pathSearchString, boolean isHeadRequest, String linkBase) { + String pathSearchString, boolean isHeadRequest) { throw new NotImplementedException("Domain Name Registry information only"); } } diff --git a/java/google/registry/rdap/RdapJsonFormatter.java b/java/google/registry/rdap/RdapJsonFormatter.java index 1060c68e2..48ac19ee6 100644 --- a/java/google/registry/rdap/RdapJsonFormatter.java +++ b/java/google/registry/rdap/RdapJsonFormatter.java @@ -410,8 +410,14 @@ public class RdapJsonFormatter { if (parameters.getTypeString() != null) { jsonBuilder.put("typeString", parameters.getTypeString()); } + String linkBaseNotNull = nullToEmpty(linkBase); + String linkValueSuffixNotNull = nullToEmpty(parameters.getLinkValueSuffix()); String linkValueString = - nullToEmpty(linkBase) + nullToEmpty(parameters.getLinkValueSuffix()); + String.format( + "%s%s%s", + linkBaseNotNull, + (linkBaseNotNull.endsWith("/") || linkValueSuffixNotNull.startsWith("/")) ? "" : "/", + linkValueSuffixNotNull); if (parameters.getLinkHrefUrlString() == null) { jsonBuilder.put("links", ImmutableList.of(ImmutableMap.of( "value", linkValueString, diff --git a/java/google/registry/rdap/RdapNameserverAction.java b/java/google/registry/rdap/RdapNameserverAction.java index 8da8a79d6..3559843a2 100644 --- a/java/google/registry/rdap/RdapNameserverAction.java +++ b/java/google/registry/rdap/RdapNameserverAction.java @@ -58,7 +58,7 @@ public class RdapNameserverAction extends RdapActionBase { @Override public ImmutableMap getJsonObjectForResource( - String pathSearchString, boolean isHeadRequest, String linkBase) { + String pathSearchString, boolean isHeadRequest) { DateTime now = clock.nowUtc(); pathSearchString = canonicalizeName(pathSearchString); // The RDAP syntax is /rdap/nameserver/ns1.mydomain.com. @@ -79,6 +79,6 @@ public class RdapNameserverAction extends RdapActionBase { throw new NotFoundException(pathSearchString + " not found"); } return rdapJsonFormatter.makeRdapJsonForHost( - hostResource, true, rdapLinkBase, rdapWhoisServer, now, OutputDataType.FULL); + hostResource, true, fullServletPath, rdapWhoisServer, now, OutputDataType.FULL); } } diff --git a/java/google/registry/rdap/RdapNameserverSearchAction.java b/java/google/registry/rdap/RdapNameserverSearchAction.java index e4f72815b..a1a9cc88b 100644 --- a/java/google/registry/rdap/RdapNameserverSearchAction.java +++ b/java/google/registry/rdap/RdapNameserverSearchAction.java @@ -87,7 +87,7 @@ public class RdapNameserverSearchAction extends RdapActionBase { */ @Override public ImmutableMap getJsonObjectForResource( - String pathSearchString, boolean isHeadRequest, String linkBase) { + String pathSearchString, boolean isHeadRequest) { DateTime now = clock.nowUtc(); // RDAP syntax example: /rdap/nameservers?name=ns*.example.com. // The pathSearchString is not used by search commands. @@ -126,7 +126,7 @@ public class RdapNameserverSearchAction extends RdapActionBase { BoilerplateType.NAMESERVER, results.getIncompletenessWarnings(), ImmutableList.>of(), - rdapLinkBase); + fullServletPath); return jsonBuilder.build(); } @@ -175,7 +175,7 @@ public class RdapNameserverSearchAction extends RdapActionBase { return RdapSearchResults.create( ImmutableList.of( rdapJsonFormatter.makeRdapJsonForHost( - hostResource, false, rdapLinkBase, rdapWhoisServer, now, OutputDataType.FULL))); + hostResource, false, fullServletPath, rdapWhoisServer, now, OutputDataType.FULL))); } /** Searches for nameservers by name using the superordinate domain as a suffix. */ @@ -267,7 +267,7 @@ public class RdapNameserverSearchAction extends RdapActionBase { for (HostResource host : Iterables.limit(hosts, rdapResultSetMaxSize)) { jsonListBuilder.add( rdapJsonFormatter.makeRdapJsonForHost( - host, false, rdapLinkBase, rdapWhoisServer, now, outputDataType)); + host, false, fullServletPath, rdapWhoisServer, now, outputDataType)); } ImmutableList> jsonList = jsonListBuilder.build(); return RdapSearchResults.create( diff --git a/java/google/registry/request/FullServletPath.java b/java/google/registry/request/FullServletPath.java new file mode 100644 index 000000000..4f3118d6c --- /dev/null +++ b/java/google/registry/request/FullServletPath.java @@ -0,0 +1,30 @@ +// Copyright 2017 The Nomulus Authors. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package google.registry.request; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import javax.inject.Qualifier; + +/** + * Dagger qualifier for the HTTP servlet path, prepended with scheme, host and port. + * + * See {@link javax.servlet.http.HttpServletRequest#getServletPath} + */ +@Qualifier +@Documented +@Retention(RetentionPolicy.RUNTIME) +public @interface FullServletPath {} diff --git a/java/google/registry/request/RequestModule.java b/java/google/registry/request/RequestModule.java index cc8b6d533..a02d69e96 100644 --- a/java/google/registry/request/RequestModule.java +++ b/java/google/registry/request/RequestModule.java @@ -90,6 +90,20 @@ public final class RequestModule { return req.getRequestURI(); } + @Provides + @FullServletPath + static String provideFullServletPath(HttpServletRequest req) { + // Include the port only if it differs from the default for the scheme. + if ((req.getScheme().equals("http") && (req.getServerPort() == 80)) + || (req.getScheme().equals("https") && (req.getServerPort() == 443))) { + return String.format("%s://%s%s", req.getScheme(), req.getServerName(), req.getServletPath()); + } else { + return String.format( + "%s://%s:%d%s", + req.getScheme(), req.getServerName(), req.getServerPort(), req.getServletPath()); + } + } + @Provides @RequestMethod static Action.Method provideRequestMethod(HttpServletRequest req) { diff --git a/javatests/google/registry/rdap/RdapActionBaseTest.java b/javatests/google/registry/rdap/RdapActionBaseTest.java index 5667db789..7c6257a2d 100644 --- a/javatests/google/registry/rdap/RdapActionBaseTest.java +++ b/javatests/google/registry/rdap/RdapActionBaseTest.java @@ -71,7 +71,7 @@ public class RdapActionBaseTest { @Override public ImmutableMap getJsonObjectForResource( - String pathSearchString, boolean isHeadRequest, String linkBase) { + String pathSearchString, boolean isHeadRequest) { if (pathSearchString.equals("IllegalArgumentException")) { throw new IllegalArgumentException(); } @@ -103,16 +103,16 @@ public class RdapActionBaseTest { private Object generateActualJson(String domainName) { action.requestPath = RdapTestAction.PATH + domainName; + action.fullServletPath = "http://myserver.example.com" + RdapTestAction.PATH; action.requestMethod = GET; - action.rdapLinkBase = "http://myserver.example.com/"; action.run(); return JSONValue.parse(response.getPayload()); } private String generateHeadPayload(String domainName) { action.requestPath = RdapTestAction.PATH + domainName; + action.fullServletPath = "http://myserver.example.com" + RdapTestAction.PATH; action.requestMethod = HEAD; - action.rdapLinkBase = "http://myserver.example.com/"; action.run(); return response.getPayload(); } diff --git a/javatests/google/registry/rdap/RdapDomainActionTest.java b/javatests/google/registry/rdap/RdapDomainActionTest.java index 6bb26161a..5489aaf64 100644 --- a/javatests/google/registry/rdap/RdapDomainActionTest.java +++ b/javatests/google/registry/rdap/RdapDomainActionTest.java @@ -256,11 +256,11 @@ public class RdapDomainActionTest { action = new RdapDomainAction(); action.clock = clock; action.request = request; + action.fullServletPath = "https://example.com/rdap"; action.response = response; action.registrarParam = Optional.empty(); action.includeDeletedParam = Optional.empty(); action.rdapJsonFormatter = RdapTestHelper.getTestRdapJsonFormatter(); - action.rdapLinkBase = "https://example.com/rdap/"; action.rdapWhoisServer = null; action.sessionUtils = sessionUtils; action.authResult = AuthResult.create(AuthLevel.USER, userAuthInfo); diff --git a/javatests/google/registry/rdap/RdapDomainSearchActionTest.java b/javatests/google/registry/rdap/RdapDomainSearchActionTest.java index 6c4e4b33f..d6fc338d0 100644 --- a/javatests/google/registry/rdap/RdapDomainSearchActionTest.java +++ b/javatests/google/registry/rdap/RdapDomainSearchActionTest.java @@ -362,11 +362,11 @@ public class RdapDomainSearchActionTest { action.clock = clock; action.request = request; + action.fullServletPath = "https://example.com/rdap"; action.response = response; action.registrarParam = Optional.empty(); action.includeDeletedParam = Optional.empty(); action.rdapJsonFormatter = RdapTestHelper.getTestRdapJsonFormatter(); - action.rdapLinkBase = "https://example.com/rdap/"; action.rdapWhoisServer = null; action.sessionUtils = sessionUtils; action.authResult = AuthResult.create(AuthLevel.USER, userAuthInfo); diff --git a/javatests/google/registry/rdap/RdapEntityActionTest.java b/javatests/google/registry/rdap/RdapEntityActionTest.java index 31a4d9f12..0ef649255 100644 --- a/javatests/google/registry/rdap/RdapEntityActionTest.java +++ b/javatests/google/registry/rdap/RdapEntityActionTest.java @@ -157,11 +157,11 @@ public class RdapEntityActionTest { action = new RdapEntityAction(); action.clock = clock; action.request = request; + action.fullServletPath = "https://example.com/rdap"; action.response = response; action.registrarParam = Optional.empty(); action.includeDeletedParam = Optional.empty(); action.rdapJsonFormatter = RdapTestHelper.getTestRdapJsonFormatter(); - action.rdapLinkBase = "https://example.com/rdap/"; action.rdapWhoisServer = null; action.sessionUtils = sessionUtils; action.authResult = AuthResult.create(AuthLevel.USER, userAuthInfo); diff --git a/javatests/google/registry/rdap/RdapEntitySearchActionTest.java b/javatests/google/registry/rdap/RdapEntitySearchActionTest.java index fc208cd03..84af14b98 100644 --- a/javatests/google/registry/rdap/RdapEntitySearchActionTest.java +++ b/javatests/google/registry/rdap/RdapEntitySearchActionTest.java @@ -140,11 +140,11 @@ public class RdapEntitySearchActionTest { action.clock = clock; action.request = request; + action.fullServletPath = "https://example.com/rdap"; action.requestPath = RdapEntitySearchAction.PATH; action.response = response; action.rdapJsonFormatter = RdapTestHelper.getTestRdapJsonFormatter(); action.rdapResultSetMaxSize = 4; - action.rdapLinkBase = "https://example.com/rdap/"; action.rdapWhoisServer = null; action.fnParam = Optional.empty(); action.handleParam = Optional.empty(); diff --git a/javatests/google/registry/rdap/RdapHelpActionTest.java b/javatests/google/registry/rdap/RdapHelpActionTest.java index 7700bd6ad..a6573880d 100644 --- a/javatests/google/registry/rdap/RdapHelpActionTest.java +++ b/javatests/google/registry/rdap/RdapHelpActionTest.java @@ -48,9 +48,9 @@ public class RdapHelpActionTest { action = new RdapHelpAction(); action.clock = clock; + action.fullServletPath = "https://example.tld/rdap"; action.response = response; action.rdapJsonFormatter = RdapTestHelper.getTestRdapJsonFormatter(); - action.rdapLinkBase = "https://example.tld/rdap/"; action.rdapWhoisServer = null; } diff --git a/javatests/google/registry/rdap/RdapNameserverActionTest.java b/javatests/google/registry/rdap/RdapNameserverActionTest.java index 8b0d01dd9..6a0d75c95 100644 --- a/javatests/google/registry/rdap/RdapNameserverActionTest.java +++ b/javatests/google/registry/rdap/RdapNameserverActionTest.java @@ -111,12 +111,12 @@ public class RdapNameserverActionTest { RdapNameserverAction action = new RdapNameserverAction(); action.clock = clock; action.request = request; + action.fullServletPath = "https://example.tld/rdap"; action.response = response; action.requestPath = RdapNameserverAction.PATH.concat(input); action.registrarParam = desiredRegistrar; action.includeDeletedParam = includeDeleted; action.rdapJsonFormatter = RdapTestHelper.getTestRdapJsonFormatter(); - action.rdapLinkBase = "https://example.tld/rdap/"; action.rdapWhoisServer = null; action.authResult = authResult; action.sessionUtils = sessionUtils; diff --git a/javatests/google/registry/rdap/RdapNameserverSearchActionTest.java b/javatests/google/registry/rdap/RdapNameserverSearchActionTest.java index 921e8ce58..2c3fb0caa 100644 --- a/javatests/google/registry/rdap/RdapNameserverSearchActionTest.java +++ b/javatests/google/registry/rdap/RdapNameserverSearchActionTest.java @@ -141,12 +141,12 @@ public class RdapNameserverSearchActionTest { inject.setStaticField(Ofy.class, "clock", clock); action.clock = clock; + action.fullServletPath = "https://example.tld/rdap"; action.requestPath = RdapNameserverSearchAction.PATH; action.request = request; action.response = response; action.rdapJsonFormatter = RdapTestHelper.getTestRdapJsonFormatter(); action.rdapResultSetMaxSize = 4; - action.rdapLinkBase = "https://example.tld/rdap/"; action.rdapWhoisServer = null; action.ipParam = Optional.empty(); action.nameParam = Optional.empty();