response.setHeader("Expires", httpDateFormat.format(calendar.getTime()));
final HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.parseMediaType(appFile.getType()));
StorageService storageService = storageServiceFactory.getStorageService(appFile.getStorageType());
long requestIfModifiedSince = request.getDateHeader("If-Modified-Since");
if (requestIfModifiedSince >= appFile.getLastUpdate().getTime()) {
response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
return null;