Re: [PHP-DEV] ext/soap ctor errors

2008-07-23 Thread Noah Fontes
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David Zülke wrote:
> I know this is horribly old, but I just stumbled across the same issue
> again and realized it has not been tackled yet.
> 
> Shouldn't we fix that for 5.3?
> 
> 
> David
> 
> 
> 
> Am 08.01.2007 um 14:51 schrieb Knut Urdalen:
> 
>> I agree with Lukas here, currently you have to be proactive against
>> the location of the WSDL-file. I currently do like this in my
>> SoapClient's:
>>
>> class MySoapClient extends SoapClient {
>> public function __construct($wsdl ,$options = array()) {
>>   if(is_resource(@fopen($wsdl, 'r'))) {
>> parent::__construct($wsdl, $options);
>>   } else {
>> throw new Exception("Parsing WSDL: Couldn't load from '$wsdl'");
>>   }
>> }
>> }
>>
>> to be able to catch that problem as an Exception.
>>
>> Regards,
>> Knut Urdalen
>>
>> Lukas Kahwe Smith wrote:
>>> Hi,
>>>
>>> why do I get warnings when I have failures in my ext/soap ctor?
>>>
>>> try {
>>>  $client = new SoapClient('http://i_dont_exist.com/some.wsdl',
>>> array('exceptions' => true));
>>> } catch (Exception $e) { }
>>>
>>> I guess even without the 'exceptions' => true it should always return
>>> all issues as an exception. I think this was agreed upon for
>>> constructor errors in PHP5, no?
>>>
>>> regards,
>>> Lukas
>>>

+1 for this.

Regards,

Noah

- --
Noah Fontes
Bitextender
http://www.bitextender.com/
Phone: +1 919 349 9826
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIh3NKhitK+HuUQJQRAmywAKCH7w7pq7r9dV+UHF81Ky7/9XzYOgCgjAGB
DopF3tsQm31fzXxDhWYU2S8=
=QPf5
-END PGP SIGNATURE-

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



Re: [PHP-DEV] Patch for HTTP successful status codes

2008-07-23 Thread Noah Fontes
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David Zülke wrote:
> Yeah. We discussed that quite a while back when I sent over the
> "ignore_errors" options patch-like thing in November:
> http://thread.gmane.org/gmane.comp.php.devel/46003
>
> I think we should do it.
>
> But what about other 3xx redirect codes? How are those handled?

I think PHP implicitly follows any Location headers it can. That's
probably not the right behavior, but for an automated process it's not bad.

I think that 3xx status codes, if they appear without a Location header,
should also probably not throw errors. They could provide valuable
information about the status of a page (particularly 304 Not Modified),
so I've updated the patch:

http://cynigram.com/~nfontes/http_fopen_wrapper.patch

BTW, any chance this could be rolled into 5.3? I think the BC break is
pretty non-notable, and it would be nice to stop throwing errors for
successful responses.

Regards,

Noah

- --
Noah Fontes
Bitextender
http://www.bitextender.com/
Phone: +1 919 349 9826
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIh20nhitK+HuUQJQRAqipAJ9pndnS4K4L5GtPzoYsEguYQSgSXwCfb6yC
YnohwjT8KYCiADQehg4Jm2A=
=UzO8
-END PGP SIGNATURE-

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



[PHP-DEV] Patch for HTTP successful status codes

2008-07-22 Thread Noah Fontes
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all,

The HTTP wrapper currently only accepts status codes 200 and 206 as
successful in the 2xx range. Response codes like 202 (Accepted) fail and
throw a warning. However, the HTTP specification defines all 2xx status
codes as successful. This has posed some problems for us in writing
RESTful applications effectively, as we're trying to take advantage of
the full spectrum of successful codes.

The patch to fix this problem is relatively straightforward; see
http://cynigram.com/~nfontes/http_fopen_wrapper.patch

If anyone could take a look at this, I would be most grateful.

Thanks and regards,

Noah

- --
Noah Fontes
Bitextender
http://www.bitextender.com/
Phone: +1 919 349 9826
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIheUThitK+HuUQJQRArGfAKCJsEZ8QDFcWpoI4g2ZsbzGVsCAxgCgtZEk
7S66/HWfSf16D2FxUTMVsGU=
=zalu
-END PGP SIGNATURE-

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