mirror of
https://github.com/google/nomulus
synced 2026-02-10 15:00:31 +00:00
Fix WHOIS formatting to match format from RA
Our whois format was flagged as wrong in the .meet PDT. Although we had followed the AWIP samples from ICANN, the definitive list of field names is from Specification 4 of our contract, available at https://newgtlds.icann.org/sites/default/files/agreements/agreement-approved-09jan14-en.htm and indeed our fields are incorrect. (The remaining formatting issues are ambiguous but the PDT testers' interpretation is probably correct.) Since the footer format is now somewhat more complicated, I also denormalized the disclaimer field into all of the testdata files. (I spent some time debugging an extra newline between the content and the disclaimer, and it would have been far clearer to solve if the files had been this way.) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=120338930
This commit is contained in:
committed by
Justine Tunney
parent
c99711c7e3
commit
4e6c8ec6fe
@@ -159,14 +159,20 @@ abstract class WhoisResponseImpl implements WhoisResponse {
|
||||
}
|
||||
|
||||
/** Returns raw text that should be appended to the end of ALL WHOIS responses. */
|
||||
E emitFooter(DateTime timestamp) {
|
||||
emitField(ICANN_REPORTING_URL_FIELD, ICANN_REPORTING_URL);
|
||||
E emitLastUpdated(DateTime timestamp) {
|
||||
// We are assuming that our WHOIS database is always completely up to date, since it's
|
||||
// querying the live backend datastore.
|
||||
stringBuilder.append(String.format(
|
||||
">>> Last update of WHOIS database: %s <<<\r\n\r\n%s\r\n",
|
||||
UtcDateTimeAdapter.getFormattedString(timestamp),
|
||||
DISCLAIMER));
|
||||
stringBuilder
|
||||
.append(">>> Last update of WHOIS database: ")
|
||||
.append(UtcDateTimeAdapter.getFormattedString(timestamp))
|
||||
.append(" <<<\r\n\r\n");
|
||||
return thisCastToDerived();
|
||||
}
|
||||
|
||||
/** Returns raw text that should be appended to the end of ALL WHOIS responses. */
|
||||
E emitFooter() {
|
||||
emitField(ICANN_REPORTING_URL_FIELD, ICANN_REPORTING_URL);
|
||||
stringBuilder.append("\r\n").append(DISCLAIMER).append("\r\n");
|
||||
return thisCastToDerived();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user