Zend Framework

Impossibile to use HTTP verbs containing dashes

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.5.0RC1, 1.5.0RC2, 1.5.0RC3, 1.5.0, 1.5.0PL1, 1.5.1, 1.5.2
  • Fix Version/s: 1.6.0
  • Component/s: Zend_Http_Client
  • Labels:
    None

Description

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 http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5
which is defined as:

token = 1*<any CHAR except CTLs or separators>
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!

Activity

Hide
Shahar Evron added a comment -

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.

Show
Shahar Evron added a comment - 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.
Hide
Wil Sinclair added a comment -

Updating for the 1.6.0 release.

Show
Wil Sinclair added a comment - Updating for the 1.6.0 release.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: