diff options
author | Henri Sara <hesara@vaadin.com> | 2012-10-25 07:01:54 +0000 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2012-10-25 07:01:54 +0000 |
commit | e6cb54651e3a082dc899107c982ba08d0d818169 (patch) | |
tree | ea72d6ce73c13dd63e5b9fdaad70cf60a8019b31 /server | |
parent | c52d3560576d54f3d496aee8672a2e981f02555d (diff) | |
parent | f1d8a30ecac3f5fe78a4a158a3d4c928213645ba (diff) | |
download | vaadin-framework-e6cb54651e3a082dc899107c982ba08d0d818169.tar.gz vaadin-framework-e6cb54651e3a082dc899107c982ba08d0d818169.zip |
Merge "Return 404 if a resource cannot be found (#10053)"
Diffstat (limited to 'server')
-rw-r--r-- | server/src/com/vaadin/server/DownloadStream.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/src/com/vaadin/server/DownloadStream.java b/server/src/com/vaadin/server/DownloadStream.java index 3ba8b3d39a..5757f7ca93 100644 --- a/server/src/com/vaadin/server/DownloadStream.java +++ b/server/src/com/vaadin/server/DownloadStream.java @@ -250,6 +250,11 @@ public class DownloadStream implements Serializable { // Download from given stream final InputStream data = getStream(); + if (data == null) { + response.setStatus(HttpServletResponse.SC_NOT_FOUND); + return; + } + if (data != null) { OutputStream out = null; |