public function get_object($bucket, $object, $options = null)
{
//options
$this->validate_options($options);
if (!$options) {
$options = array();
}
//bucket
$this->is_empty($bucket, OSS_BUCKET_IS_NOT_ALLOWED_EMPTY);
//object
$this->is_empty($object, OSS_OBJECT_IS_NOT_ALLOWED_EMPTY);
if (isset($options[self::OSS_FILE_DOWNLOAD]) && $this->chk_chinese($options[self::OSS_FILE_DOWNLOAD])) {
$options[self::OSS_FILE_DOWNLOAD] = iconv('utf-8', 'gbk', $options[self::OSS_FILE_DOWNLOAD]);
}
$options[self::OSS_BUCKET] = $bucket;
$options[self::OSS_METHOD] = 'GET';
$options[self::OSS_OBJECT] = $object;
if (isset($options['lastmodified'])) {
$options[self::OSS_HEADERS][self::OSS_IF_MODIFIED_SINCE] = $options['lastmodified'];
unset($options['lastmodified']);
}
if (isset($options['etag'])) {
$options[self::OSS_HEADERS][self::OSS_IF_NONE_MATCH] = $options['etag'];
unset($options['etag']);
}
if (isset($options['range'])) {
$options[self::OSS_HEADERS][self::OSS_RANGE] = 'bytes=' . $options['range'];
unset($options['range']);
}
return $this->auth($options);
}