Req #17460 [Opn->Fbk]: Allow set custom content-type header for POST requests
| From: | daniel dot oconnor at gmail dot com | Date: | Thu, 03 Jun 2010 01:06:44 +0000 |
| Subject: | Req #17460 [Opn->Fbk]: Allow set custom content-type header for POST requests | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-3855@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=17460&edit=1
ID: 17460
Updated by: daniel.oconnor@gmail.com
Reported By: dimzav at gmail dot com
Summary: Allow set custom content-type header for POST
requests
-Status: Open
+Status: Feedback
Type: Feature/Change Request
Package: HTTP_Request2
Operating System: Windows, Linux
Package Version: 0.5.2
PHP Version: 5.2.12
Roadmap Versions:
New Comment:
-Status: Open
+Status: Feedback
If you could whip up a bit of code showing what you want to do; the
expected vs actual results...
ie..
$request = new HTTP_Request2();
$request->setFoo();
$result = $request->send();
assert($result->didSomething());
... then you'll probably find someone happy to implement this for you
:)
Previous Comments:
------------------------------------------------------------------------
[2010-06-02 20:10:49] zyava
Description:
------------
Look on next line in the HTTP_Request2->getBody method:
if ('application/x-www-form-urlencoded' ==
$this->headers['content-type']) {
If I wish to set manual content-type header, for example:
Content-Type: application/x-www-form-urlencoded; charset=utf-8
because of this line post body will not be generated and sent. I
propose change this line to:
if (strpos($this->headers['content-type'],
'application/x-www-form-urlencoded') !== false) {
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=17460&edit=1