On 17 Sep 2012, at 11:05, Igor Stasenko <[email protected]> wrote:

> yeah, i think it is pointless to retry if you get 404 "not found"
> response. Usually (of course if web server conforms to HTTP RFC), this
> means that requested resource is really not there and will not be
> there anytime soon :)

I decided to only do retries on NetworkError, ZnParseError for now, we'll see 
how it goes.
The ifFail block will be triggered on any Error.

> On 16 September 2012 23:10, Camillo Bruni <[email protected]> wrote:
>> 
>> On 2012-09-16, at 22:50, Sven Van Caekenberghe <[email protected]> wrote:
>> 
>>> 
>>> On 16 Sep 2012, at 21:56, Camillo Bruni <[email protected]> wrote:
>>> 
>>>>> I am especially interested in the last point. Has it something to do with 
>>>>> (using) Zn ?
>>>> 
>>>> yes, we basically did a HEAD request and returned false on 404, however
>>>> Zn does 3 or so retries, and thus makes everything slow :). I don't know 
>>>> what
>>>> the side-effects are, but we reduce the retryCount to 0, to get low 
>>>> response times.
>>>> 
>>>> I thought that upon a valid 404 response there is no retry needed? (but I 
>>>> guess
>>>> I miss something here :P)
>>> 
>>> The reason ZnClient keeps on retrying on 404 is because you probably had 
>>> #enforceHttpSuccess true as part of #systemPolicy and only 2xx response are 
>>> considered a success.
>> 
>> ah right, that will do it!
>> 
>>> But this is an interesting use case: basically 404 is a valid response 
>>> here. I'll have to think about that so more.
>> 
>> well now I know, so I'm fine by manually changing it :P

--
Sven Van Caekenberghe
http://stfx.eu
Smalltalk is the Red Pill




Reply via email to