Skip to content

No way to pass headers to DataObject::copy() #755

@syosoft

Description

@syosoft

Not sure how to do Pull Requests but need the ability to pass headers to copy() as the object headers are not copied.

rackspace/php-opencloud/lib/OpenCloud/ObjectStore/Resource/DataObject.php:368-382

/**
     * @param string $destination Path (`container/object') of new object
     * @return \Guzzle\Http\Message\Response
     */
    public function copy($destination, $headers = array())
    {
        $headers = array_merge(!is_array($headers) ? array() : array_filter($headers), array(
            'Destination' => (string) $destination,
        ));

        return $this->getService()
            ->getClient()
            ->createRequest('COPY', $this->getUrl(), $headers)
            ->send();
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions