Clean up RDAP code

For some reason, although a constant was defined for the RDAP response content type, it was being used in one place but not another.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143185157
This commit is contained in:
mountford 2016-12-29 08:34:20 -08:00 committed by Ben McIlwain
parent 98bbf8e7a2
commit ab3f352782

View file

@ -115,7 +115,7 @@ public abstract class RdapActionBase implements Runnable {
if (requestMethod != Action.Method.HEAD) { if (requestMethod != Action.Method.HEAD) {
response.setPayload(JSONValue.toJSONString(rdapJson)); response.setPayload(JSONValue.toJSONString(rdapJson));
} }
response.setContentType(MediaType.create("application", "rdap+json")); response.setContentType(RESPONSE_MEDIA_TYPE);
} catch (HttpException e) { } catch (HttpException e) {
setError(e.getResponseCode(), e.getResponseCodeString(), e.getMessage()); setError(e.getResponseCode(), e.getResponseCodeString(), e.getMessage());
} catch (URISyntaxException | IllegalArgumentException e) { } catch (URISyntaxException | IllegalArgumentException e) {