PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTTP » HTTP_Request » Bug #7922

content-type is removed on mistake

Details

Submitted2006-06-16 12:35 UTC
Fromilia_kantor at webamg dot com
Assignedavb
StatusClosed
PackageHTTP_Request
PHP Version5.1.4
OSGentoo Linux
Roadmaps(Not assigned)

Comments

[2006-06-16 12:35 UTC] ilia_kantor at webamg dot com

Description:
------------
If I setMethod("PUT") and provide content-type, then
_build_request removes content-type from request.

POST works fine, but PUT is needed for webservices!

[2006-10-08 18:27 UTC] william at sqlcoders dot com

for anyone who's been annoyed by this bug, as it still seems to be in the current distro, the fix is to change line 765 to
(HTTP_REQUEST_METHOD_POST == $this->_method && empty($this->_postData) && empty($this->_postFiles))) {

(was
(HTTP_REQUEST_METHOD_POST != $this->_method && empty($this->_postData) && empty($this->_postFiles))) {
).. it's just that first ! that should be a =