+ $content = (string)stream_get_contents( $op['stream'] );
+ $size = strlen( $content );
+ // Make sure that stream finished
+ if ( $size === (int)$rhdrs['content-length'] ) {
+ $contents[$path] = $content;
+ } else {
+ $contents[$path] = self::$RES_ERROR;
+ $rerr = "Got {$size}/{$rhdrs['content-length']} bytes";
+ $this->onError( null, __METHOD__,
+ [ 'src' => $path ] + $ep, $rerr, $rcode, $rdesc );
+ }