Zend Framework

Zend_Http_Client->setHeaders() is too strict...

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.5.0
  • Component/s: Zend_Http_Client
  • Labels:
    None

Description

setHeaders() checks the header name to make sure it's valid. Some vendors, such as SWSoft provide a API that requires several non-standard HTTP headers. I attached a patch to make it strict/not strict

Issue Links

Activity

Hide
Kevin McArthur added a comment -

I'd suggest that instead of adding strict mode settings that instead the job of adding http compliant headers be left up to the programmer. At the least, we shouldn't purposefully make sw-softs api incompatible, and at the best, the regexp just isnt needed and is only extra processing and weight.

I'd change the patch to remove the check.

Show
Kevin McArthur added a comment - I'd suggest that instead of adding strict mode settings that instead the job of adding http compliant headers be left up to the programmer. At the least, we shouldn't purposefully make sw-softs api incompatible, and at the best, the regexp just isnt needed and is only extra processing and weight. I'd change the patch to remove the check.
Hide
Thomas Weidner added a comment -

Assigned to Shahar

Show
Thomas Weidner added a comment - Assigned to Shahar
Hide
Shahar Evron added a comment -

Should now be fixed in r. 6648. You can disable header name checking by passing the 'strict' => 'false' configuration option to the client.

Show
Shahar Evron added a comment - Should now be fixed in r. 6648. You can disable header name checking by passing the 'strict' => 'false' configuration option to the client.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: