diff options
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; |