Commit 04c47003 authored by Sebastian Kummer's avatar Sebastian Kummer

Revert "Merge pull request #67 in ZP/z-push from...

Revert "Merge pull request #67 in ZP/z-push from bugfix/ZP-726-infinit-loop-if-non-stream-given-for-an-attachment to develop"

This reverts commit 16800140.
parent 57d97d62
...@@ -61,8 +61,7 @@ class GetAttachment extends RequestProcessor { ...@@ -61,8 +61,7 @@ class GetAttachment extends RequestProcessor {
$stream = $attachment->data; $stream = $attachment->data;
ZLog::Write(LOGLEVEL_DEBUG, sprintf("HandleGetAttachment(): attachment stream from backend: %s", $stream)); ZLog::Write(LOGLEVEL_DEBUG, sprintf("HandleGetAttachment(): attachment stream from backend: %s", $stream));
// need to check for a resource here, as eg. feof('Error') === false and causing infinit loop in while! if ($stream == null)
if (!is_resource($stream))
throw new StatusException(sprintf("HandleGetAttachment(): No stream resource returned by backend for attachment: %s", $attname), SYNC_ITEMOPERATIONSSTATUS_INVALIDATT); throw new StatusException(sprintf("HandleGetAttachment(): No stream resource returned by backend for attachment: %s", $attname), SYNC_ITEMOPERATIONSSTATUS_INVALIDATT);
header("Content-Type: application/octet-stream"); header("Content-Type: application/octet-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