ZF2-78: Http\Client throws RuntimeException when passed additional Encoding info.

Issue Type: Bug Created: 2011-10-17T11:57:02.000+0000 Last Updated: 2011-10-27T13:20:06.000+0000 Status: Resolved Fix version(s): Reporter: Kazusuke Sasezaki (sasezaki) Assignee: Kazusuke Sasezaki (sasezaki) Tags: - Zend\Http

  • charset
  • x-www-form-urlencoded,

Related issues: Attachments:


Zend\Http\Client can't rock Content-Type. in case of "application/x-www-form-urlencoded; charset=UTF-8"

<pre class="highlight">
$client = new \Zend\Http\Client;
$client->setUri('<a href=""></a>');
    //'Content-Type' => 'application/x-www-form-urlencoded'  // Exception not throw
    'Content-Type' => 'application/x-www-form-urlencoded; charset=UTF-8' // throw  RuntimeException
$client->setParameterPost(array('test' => 'foobar'));

(I met this error when upgrading Service\Akismet.. Akismet class uses setHeaders method as below.

<pre class="highlight">
'Content-Type' => 'application/x-www-form-urlencoded; charset=' . $this->getCharset()

Currently ZF1's Http_Client reset enctype at setMethod

<pre class="highlight">

So, I doubt as ZF1's lack of feature.. )


Posted by Kazusuke Sasezaki (sasezaki) on 2011-10-27T13:20:06.000+0000

patch is merged

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.