summaryrefslogtreecommitdiffstats
path: root/server/src
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-10-24 13:29:58 +0300
committerArtur Signell <artur@vaadin.com>2012-10-24 13:29:58 +0300
commitf1d8a30ecac3f5fe78a4a158a3d4c928213645ba (patch)
treebbf51a03c63eb82ebb87fbd60e8120c746038429 /server/src
parentc280cf41802d5d5025e311596f3269237ebbf9cc (diff)
downloadvaadin-framework-f1d8a30ecac3f5fe78a4a158a3d4c928213645ba.tar.gz
vaadin-framework-f1d8a30ecac3f5fe78a4a158a3d4c928213645ba.zip
Return 404 if a resource cannot be found (#10053)
Change-Id: Iaf87eb7af6f89decb61b7fd2ac953ca6a6dac15a
Diffstat (limited to 'server/src')
-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;