mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
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:
parent
bb82f5bc05
commit
2b2fb958f6
15 changed files with 76 additions and 182 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue