Hi,

I've been extending the pecl/oauth code to work with php stream
wrappers in cases whereby curl is not enabled, but I've hit a snag.

The documentation states that enabling the "ignore_errors" flag will
fetch the content even on failure status codes. At the same time,
setting "max_redirects" to <= 1 indicates that no redirects will be
followed.

It does not state that setting "max_redirects" <= 1 would actually
trigger an error, though in the code it returns (php_stream *)NULL
making it impossible to even get the headers out of the wrapperdata
hash unless STREAM_ONLY_GET_HEADERS is used.

So, either setting "max_redirects" <= 1 should not throw NULL back
into the caller code or "ignore_error" behaviour should be extended to
prevent that from happening.

My attached patch favours to fix the latter, since the "ignore_errors"
is a relatively new flag. Hope it will be accepted for the 5.3
release.

(not sure whether attachments will be allowed ... give me a ping if it
doesn't make it through)


Best,
 Tjerk

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to