mirror of
https://github.com/google/nomulus
synced 2026-01-10 07:57:58 +00:00
Set the MIME type BEFORE the payload
When we set the payload, it is converted to bytes using the response's character set. Changing the MIME type later has no effect on the conversion to bytes, even though it does change the returned MIME type. This results in bytes that were encoded using one character set while the response reports a different character set. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=196258752
This commit is contained in:
@@ -52,8 +52,8 @@ public class EppRequestHandler {
|
||||
EppOutput eppOutput =
|
||||
eppController.handleEppCommand(
|
||||
sessionMetadata, credentials, eppRequestSource, isDryRun, isSuperuser, inputXmlBytes);
|
||||
response.setPayload(new String(marshalWithLenientRetry(eppOutput), UTF_8));
|
||||
response.setContentType(APPLICATION_EPP_XML);
|
||||
response.setPayload(new String(marshalWithLenientRetry(eppOutput), UTF_8));
|
||||
// Note that we always return 200 (OK) even if the EppController returns an error response.
|
||||
// This is because returning a non-OK HTTP status code will cause the proxy server to
|
||||
// silently close the connection without returning any data. The only time we will ever return
|
||||
|
||||
Reference in New Issue
Block a user