|
|
@@ -331,15 +331,15 @@ class Zend_Http_Client
|
|
|
*/
|
|
|
public function setMethod($method = self::GET)
|
|
|
{
|
|
|
- $regex = '/^[^\x00-\x1f\x7f-\xff\(\)<>@,;:\\\\"\/\[\]\?={}\s]+$/';
|
|
|
- if (! preg_match($regex, $method)) {
|
|
|
+ if (! preg_match('/^[^\x00-\x1f\x7f-\xff\(\)<>@,;:\\\\"\/\[\]\?={}\s]+$/', $method)) {
|
|
|
/** @see Zend_Http_Client_Exception */
|
|
|
require_once 'Zend/Http/Client/Exception.php';
|
|
|
throw new Zend_Http_Client_Exception("'{$method}' is not a valid HTTP request method.");
|
|
|
}
|
|
|
|
|
|
- if ($method == self::POST && $this->enctype === null)
|
|
|
+ if ($method == self::POST && $this->enctype === null) {
|
|
|
$this->setEncType(self::ENC_URLENCODED);
|
|
|
+ }
|
|
|
|
|
|
$this->method = $method;
|
|
|
|