private void setResponseHeaders(BlobInfo blobInfo) throws RestServiceException {
    BlobProperties blobProperties = blobInfo.getBlobProperties();
    restResponseChannel.setHeader(RestUtils.Headers.LAST_MODIFIED, new Date(blobProperties.getCreationTimeInMs()));
    restResponseChannel.setHeader(RestUtils.Headers.BLOB_SIZE, blobProperties.getBlobSize());
    if (blobProperties.getContentType() != null) {
      restResponseChannel.setHeader(RestUtils.Headers.CONTENT_TYPE, blobProperties.getContentType());
      if (blobProperties.getContentType().equals("text/html")) {
        restResponseChannel.setHeader("Content-Disposition", "attachment");
      }
    }
  }
Sets the required headers in the response.
@param blobInfo the {@link BlobInfo} to refer to while setting headers.
@throws RestServiceException if there was any problem setting the headers.
ambry-api/src/test/java/com/github/ambry/rest/MockRestRequestService.java