ZF-5708: Zend_Http_Client does not have method to clean headers

Issue Type: Improvement Created: 2009-02-06T10:15:50.000+0000 Last Updated: 2009-11-24T16:51:37.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: Stanislav Malyshev (stas) Assignee: Pádraic Brady (padraic) Tags: - Zend_Http_Client

Related issues: Attachments:


Currently, there's no method that would reset the state of Zend_Http_Client , particularly that would clean all headers. While one can set and clean specific headers with setHeaders() and reset some state parts with resetParams(), full reset is impossible. This makes it very hard to reuse same client with same settings for multiple requests, and since many classes in Zend_Service_* still do so, it leads to various bugs.

We need to add either cleanup method or make resetParams() clean all headers, or have setHeaders somehow extended to clean all headers except for those set.


Posted by Till Klampaeckel (till) on 2009-02-24T07:24:44.000+0000

This other method should probably clear last_request and last_response as well, or what are you after? Would you also clear the entire "configuration" (e.g. uri, method, proxy, ...)?

I could do a patch if you gave me some feedback.

Posted by Stanislav Malyshev (stas) on 2009-11-24T16:51:36.000+0000

Fixed - now resetParameters(true) will reset headers and last_*

Have you found an issue?

See the Overview section for more details.


© 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.