Skip to content

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

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();
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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