Issues

ZF-3515: Http client should reset Slug header (set when uploading file using APP)

Issue Type: Bug Created: 2008-06-26T05:12:41.000+0000 Last Updated: 2009-02-12T15:53:12.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: Bruno Ketelbueters (bruno_kb) Assignee: Ryan Boyd (rboyd) Tags: - Zend_Gdata

Related issues: Attachments:

Description

When uploading a file using Zend_Gdata_App's post() method, a Slug header is added to the StaticHttpClient's headers. If you use the same Zend_Gdata_App instance to POST an atom entry ("application/atom+xml;type=entry") afterwards, the Slug header is also included in this request. This may confuse the server into believing that the request wants to upload a binary file, instead of sending data.

Simple solution, add the following line to Zend_Http_Client's resetParameters(): if (isset($this->headers['slug'])) unset($this->headers['slug']);

Comments

Posted by Shahar Evron (shahar) on 2008-06-26T05:29:02.000+0000

This is not a Zend_Http_Client fix - Zend_Http_Client is generic and the resetParameters() method will not reset any service-specific headers or parameters.

I think this should be fixed in Zend_Gdata by doing this after the request:

<pre class="highlight">
$this->_httpClient->('slug', null);

Posted by Shahar Evron (shahar) on 2008-07-03T13:55:31.000+0000

Not a Zend_Http_Client issue.

Posted by Ryan Boyd (rboyd) on 2008-07-03T14:21:35.000+0000

Thanks Bruno and Shahar.

This issue was fixed for ZF 1.6 in r9846, as part of the code to implement secure authsub and refactor some of the HTTP handling.

Please see: http://framework.zend.com/code/browse/…

We set the header to null before any HTTP request in line 472, before setting the parameters for the new request.

Thanks for the report!

Cheers, -Ryan

Posted by Trevor Johns (tjohns) on 2009-02-12T15:53:12.000+0000

Marking as fixed for the 1.6.0 release.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts