protected function getNewHeaders()
    {
        $headers = array(
            'Content-Length' => (null !== $this->size) ? strval($this->size) : '0',
        );

        if (null !== $this->manifest) {
            $headers['X-Object-Manifest'] = $this->manifest;
        }

        if (null !== $this->etag) {
            $headers['ETag'] = $this->etag;
        }

        if (null !== $this->contentType) {
            $headers['Content-Type'] = $this->contentType;
        } else {
            $headers['Content-Type'] = 'application/octet-stream';
        }

        foreach ($this->metadata as $key => $value) {
            $key = str_ireplace('X-Container-Meta-', '', $key);

            if (strlen($key) > META_NAME_LIMIT) {
                throw new Exceptions\InvalidMetaName();
            }

            if (strlen($value) > META_VALUE_LIMIT) {
                throw new Exceptions\InvalidMetaValue();
            }

            $headers['X-Object-Meta-' . $key] = $value;
        }

        return array_merge($this->headers, $headers);
    }