ZF-3484: Impossibile to use HTTP verbs containing dashes

Issue Type: Bug Created: 2008-06-19T13:35:58.000+0000 Last Updated: 2008-09-02T10:39:31.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: Dragos Ionita (fusion5) Assignee: Shahar Evron (shahar) Tags: - Zend_Http_Client

Related issues: Attachments:


I've started using Zend Framework and it's great.

Having a small problem with the Zend_Http_Client: Instead of the usual POST and GET I'm trying to send a HTTP request called "X-MS-ENUMATTS" (to access a microsoft WebDav server).

In the http standard, the request word is defined as a token in… which is defined as:

token = 1* separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT

Since "-" is not in the exception list, would you consider adding it to the reigular expresion that checks the syntax?

The exception and stack trace are pasted below:

Fatal error: Uncaught exception 'Zend_Http_Client_Exception' with message ''X-MS-ENUMATTS' is not a valid HTTP request method.' in D:\Workspace\ZendFramework-1.5.2\library\Zend\Http\Client.php:289 Stack trace:

0 D:\Workspace\ame\library\Fusion\Exchange\Connection.php(31): Zend_Http_Client->setMethod('X-MS-ENUMATTS')

1 D:\Workspace\ame\application\models\ExchangeAttachment.php(83): Fusion_Exchange_Connection->setRequest('X-MS-ENUMATTS', Object(Fusion_Exchange_Request))

2 D:\Workspace\ame\application\controllers\MessageController.php(21): ExchangeAttachment->getAttachments(Object(Fusion_Exchange_Request))

3 D:\Workspace\ZendFramework-1.5.2\library\Zend\Controller\Action.php(502): MessageController->indexAction()

4 D:\Workspace\ZendFramework-1.5.2\library\Zend\Controller\Dispatcher\Standard.php(293): Zend_Controller_Action->dispatch('indexAction') #5 D:\Workspace\ZendFramework-1.5.2\library\Zend\Controller\Front.php(914): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Con in D:\Workspace\ZendFramework-1.5.2\library\Zend\Http\Client.php on line 289

Thank you very much!


Posted by Shahar Evron (shahar) on 2008-06-23T12:04:44.000+0000

Fixed in r. 9765

Validation is now done exactly as stated in RFC. This is a bit less efficient but is flexible, and according to specs.

Posted by Wil Sinclair (wil) on 2008-09-02T10:39:31.000+0000

Updating for the 1.6.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.