aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2012-10-25 07:01:54 +0000
committerVaadin Code Review <review@vaadin.com>2012-10-25 07:01:54 +0000
commite6cb54651e3a082dc899107c982ba08d0d818169 (patch)
treeea72d6ce73c13dd63e5b9fdaad70cf60a8019b31 /server
parentc52d3560576d54f3d496aee8672a2e981f02555d (diff)
parentf1d8a30ecac3f5fe78a4a158a3d4c928213645ba (diff)
downloadvaadin-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.java5
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;