Commit 4d6106c2 authored by skummer's avatar skummer

ZP-414 #comment check if stream resource is available before trying to stream it #time 15m

git-svn-id: https://z-push.org/svn/z-push/trunk@1688 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 48e3b1c6
......@@ -61,6 +61,9 @@ class GetAttachment extends RequestProcessor {
$stream = $attachment->data;
ZLog::Write(LOGLEVEL_DEBUG, sprintf("HandleGetAttachment(): attachment stream from backend: %s", $stream));
if ($stream == null)
throw new StatusException(sprintf("HandleGetAttachment(): No stream resource returned by backend for attachment: %s", $attname), SYNC_ITEMOPERATIONSSTATUS_INVALIDATT);
header("Content-Type: application/octet-stream");
$l = 0;
while (!feof($stream)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment