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.
This commit is contained in:
parent
d93068bdfa
commit
e10274aaf7
1 changed files with 4 additions and 0 deletions
|
@ -94,6 +94,10 @@ public class FileServingServlet extends VitroHttpServlet {
|
||||||
String actualFilename = findAndValidateFilename(fileInfo, path);
|
String actualFilename = findAndValidateFilename(fileInfo, path);
|
||||||
|
|
||||||
in = openImageInputStream(fileInfo, actualFilename);
|
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) {
|
} catch (Exception e) {
|
||||||
log.warn("Failed to serve the file at '" + path + "' -- " + e.getMessage());
|
log.warn("Failed to serve the file at '" + path + "' -- " + e.getMessage());
|
||||||
in = openMissingLinkImage(request);
|
in = openMissingLinkImage(request);
|
||||||
|
|
Loading…
Add table
Reference in a new issue