Turn CheckApiAction into a standard-ish epp endpoint

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125335634
This commit is contained in:
cgoldfeder 2016-06-20 07:38:55 -07:00 committed by Ben McIlwain
parent bb82f5bc05
commit 2b2fb958f6
15 changed files with 76 additions and 182 deletions

View file

@ -15,6 +15,7 @@
package google.registry.flows;
import static google.registry.flows.EppXmlTransformer.marshalWithLenientRetry;
import static java.nio.charset.StandardCharsets.UTF_8;
import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST;
import static javax.servlet.http.HttpServletResponse.SC_OK;
@ -48,13 +49,15 @@ public class EppRequestHandler {
byte[] inputXmlBytes) {
try {
response.setPayload(new String(
eppController.handleEppCommand(
sessionMetadata,
credentials,
eppRequestSource,
isDryRun,
isSuperuser,
inputXmlBytes), UTF_8));
marshalWithLenientRetry(
eppController.handleEppCommand(
sessionMetadata,
credentials,
eppRequestSource,
isDryRun,
isSuperuser,
inputXmlBytes)),
UTF_8));
response.setContentType(APPLICATION_EPP_XML);
// Note that we always return 200 (OK) even if the EppController returns an error response.
// This is because returning an non-OK HTTP status code will cause the proxy server to