On 2005-08-25, Michael Peters <suppressed> wrote:
> Jason A. Crome wrote:
>> On Aug 25, 2005, at 11:56 AM, Michael Peters wrote:
>
>>> I don't think the user should have to call create_captcha() at all. It
>>> should be a run mode that is automatically added to the using app.
>>
>>
>> What about those runmodes that don't need a CAPTCHA? All of my
>> runmodes are not good candidates for it.
>
> I'm not saying evey runmode should call create_captcha(), I'm saying
> create_captcha() should be a run mode in and of itself.
I would do this, too.
>> so, what of cgiapp_postrun? For those of us that sometimes alter
>> headers there, this would be an issue to be contended with.
>
> That's a good question. It's possible that a postrun could alter headers
> incorrectly or mangle the image. There's a couple of options that come
> to mind quickly. How good they are is definitely a wildcard :)
>
> + Maybe C::A needs a way for a plugin to not only register a callback,
> but also unregister a hook/callback. So the create_captcha() run mode
> would just make sure there are no postruns running. This could cause
> problems though if you have postruns that need to run that wouldn't
> affect the headers or the image.
I would say the best practice here is for cgiapp_postrun to check the
Content-type header.
If it usually munges HTML, it should check that the Content-Type is 'text/html'
and leave everything else alone.
Mark
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.