On Tue, May 8, 2012 at 3:19 AM, Lieven Govaerts <svnlgo_at_mobsol.be> wrote:
> On Tue, May 8, 2012 at 2:29 AM, Greg Stein <gstein_at_gmail.com> wrote:
>...
>> My intent is to replace the code you quoted with something basically
>> like: handler->server_error = alloc(). The core response handler will
>> then start processing the body as an error.
>
> So you mark the request as done as soon as the 404 is recognized, but then
> add an extra reminder for ra_serf to continue processing the response until
> read completely. That's better than what I suggested before.
Not quite. The "done" flag needs to wait until the entire response has
been consumed. Otherwise, we might not reenter serf_context_run() to
actually finish the thing off.
I guess there *is* the possibility to let the upper level continue
immediately, and *if* the context is run again, then we consume the
remaining response before dealing with further responses. RIght now...
not trying to deal with that. My hope is to just build in all "done"
processing into the core handling and wait for the response EOF. (not
just when the semantics seem to indicate done-ness)
>> There are a couple similar cases. I'm looking at them now to ensure
>> the errors these things raise will propagate correctly, or to place
>> the error creation elsewhere. It should be fixed within a few days
>> (traveling tmw).
>
> Nice. I'll keep my windows vm uptodate, I'll see if I can find some time
> next week to test your changes.
Cool. Thanks!
Cheers,
-g
Received on 2012-05-08 10:04:32 CEST