From e10274aaf7fadab782cc4b3c604c244448cafcfc Mon Sep 17 00:00:00 2001 From: j2blake Date: Wed, 14 Nov 2012 11:25:17 -0500 Subject: [PATCH] NIHVIVO-4010 Log requests for invalid file-based URLs as INFO, not WARN. When a request comes in like /file/n1645/Ashdown_Susan_1.jpg, and either there is no such entity, or it is not a FileBytestream, or its name is different from requested, continue to serve the Missing Link image, but log the error with an INFO message, not a WARN message. --- .../vitro/webapp/filestorage/serving/FileServingServlet.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/filestorage/serving/FileServingServlet.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/filestorage/serving/FileServingServlet.java index 53c30e304..388b71e38 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/filestorage/serving/FileServingServlet.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/filestorage/serving/FileServingServlet.java @@ -94,6 +94,10 @@ public class FileServingServlet extends VitroHttpServlet { String actualFilename = findAndValidateFilename(fileInfo, path); in = openImageInputStream(fileInfo, actualFilename); + } catch (FileServingException e) { + log.info("Failed to serve the file at '" + path + "' -- " + e.getMessage()); + in = openMissingLinkImage(request); + mimeType = "image/png"; } catch (Exception e) { log.warn("Failed to serve the file at '" + path + "' -- " + e.getMessage()); in = openMissingLinkImage(request);