When me and Kevin talked about it on #zftalk, we both came to a
similar solution. We thought it should be up to us to do the
validation on the headers ourselves.. (Or, provide a method that can
do it...).
In the end, I think it's a better solution to just make the following
changes:
- remove header validation regex
- add a validateHeaders function
On Oct 11, 2007, at 1:10 PM, Shahar Evron wrote:
Currently we throw exceptions when non-RFC-compliant HTTP headers are
passed to the setHeaders() method. Following ZF-2019 I did some
thinking, and it seems there is a good reason to allow a non-strict
mode
in which users could add their own headers.
What I propose doing is one of the following:
1. Add a configuration option ("strict") to the HTTP Client object
(passed in the constructor or using setConfig()). This option will be
set to true by default - but if set to false, will allow setting
non-strict headers and possibly override some other RFC-compliance
tests.
2. Add an optional $strict parameter to the setHeaders() method.
3. Ignore non-compliance requests and tell people to subclass
Zend_Http_Client ;)
I tend to favor #1 because it allows a general non-strict mode for the
entire client (and not just for setHeaders()).
Opinions or thoughts are welcome.
--
Best Regards,
Shahar Evron <[EMAIL PROTECTED]>
Professional Services Engineer Department of Global Services
Zend Technologies