Commit 3bbd6f52 authored by mku's avatar mku

ZP-150 #comment Inline images can not be downloaded with Windows Phone 7.5 or...

ZP-150 #comment Inline images can not be downloaded with Windows Phone 7.5 or Samsung Galaxy S2, warnings when sending an inline image from the webclient to an android phone #time 5m

git-svn-id: https://z-push.org/svn/z-push/trunk@1424 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 3ab7fac6
...@@ -70,9 +70,9 @@ class padding_filter extends php_user_filter { ...@@ -70,9 +70,9 @@ class padding_filter extends php_user_filter {
function filter($in, $out, &$consumed, $closing) { function filter($in, $out, &$consumed, $closing) {
while ($bucket = stream_bucket_make_writeable($in)) { while ($bucket = stream_bucket_make_writeable($in)) {
if ($this->padding != 0 && $bucket->datalen < 8192) { if ($this->padding != 0 && $bucket->datalen < 8192) {
$bucket->data .= str_pad($bucket->data, $padding, 0x0); $bucket->data .= str_pad($bucket->data, $this->padding, 0x0);
} }
$consumed += ($this->padding != 0 && $bucket->datalen < 8192) ? ($bucket->datalen + $padding) : $bucket->datalen; $consumed += ($this->padding != 0 && $bucket->datalen < 8192) ? ($bucket->datalen + $this->padding) : $bucket->datalen;
stream_bucket_append($out, $bucket); stream_bucket_append($out, $bucket);
} }
return PSFS_PASS_ON; return PSFS_PASS_ON;
......
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