Hi Jim,

Modifying the headers using ucfirst() was done mainly to follow a common
convention (while not specified in the RFC, having headers in ucfirst()
is a very common practice). Considering the fact that this is an HTTP
client after all, the performance impact would be marginal (sending,
receiving and processing the HTTP messages has a much higher overhead). 

In any case this behavior has been changed in one of the post-1.0 fixes,
so if you'll check out the latest revision in the release-1.0 branch
(http://framework.zend.com/svn/framework/branch/release-1.0/ ) or even
trunk - this problem should be fixed and headers case is no longer
modified. 

Best regards,

Shahar.

On Thu, 2007-07-19 at 18:43 -0400, jim wrote:
> Just ran into a problem that brought to my attention that the 
> Zend_HTTP_Client forces all http header field names to ucfirst(). Since 
> http headers are case insensitive it is not a big deal, but then I just 
> wondered ~ why spend processing time on it?  If it is a big deal then 
> the programmer can do it while building the $header array.
> 
> It happened while testing the REST API for IBM/Yahoo! Omnifind when I 
> discovered that they had made the http headers case sensitive. There was 
> no problem when using PHP Curl and their documentation which had the 
> header fields as all lower case.  But when I rewrote the code using 
> Zend_HTTP_Client it wouldn't work.  I discovered that the headers were 
> changed when I viewed the packets with Wireshark.  Of course this is a 
> bug in Omnifind and I reported it here. 
> http://omnifind.ibm.yahoo.net/forums/index.php/topic,856.0.html
> 
> I guess that it would have taken longer to discover the OYE bug if this 
> had not happened, but it did make me wonder why this purely aesthetic 
> choice was in the framework? 
> 
> No big problem, just food for thought....
> 
> Thanks for a great framework!
> jim

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to