Skip to content
This repository was archived by the owner on Dec 6, 2019. It is now read-only.
This repository was archived by the owner on Dec 6, 2019. It is now read-only.

YouTube requests doesn't send developer_key #9

Description

@gogume

In method ZendGData\App::performHttpRequest at line 625
$this->_httpClient->setHeaders($headers);
is rewriting the headers and is not passing the X-GData-Key that was set by the ZendGData\YouTube::setHttpClient

My solution is to add all the previous headers from the request object. I added the following code from line 617, but I don't know how this will influence other requests:
$rqHeaders = $this->_httpClient->getRequest()->getHeaders()->toArray();
if (!empty($rqHeaders))
{
foreach ($rqHeaders as $key => $value)
{
if (!array_key_exists($key, $headers))
{
$headers[$key] = $value;
}
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions