result.setIfModifiedSince(request.getConditions().getModifiedSince().getTime());
}
// honor if-none-match
if (request.getConditions().getNoneMatch() != null && request.getConditions().getNoneMatch().size() > 0) {
final Tag tag = request.getConditions().getNoneMatch().get(0);
// NEXUS-5704: 500 Internal Server Error when "If-None-Match" in header
// Restlet 1.1 is very strict about properly formatted ETags (must be quoted)
// If unquoted, their presence is detected (IF above evals to true), but will
// actually return null as parsing the tag
if (tag != null && tag.getName() != null) {
result.setIfNoneMatch(tag.getName());
}
}
// stuff in the originating remote address
result.getRequestContext().put(AccessManager.REQUEST_REMOTE_ADDRESS, getValidRemoteIPAddress(request));