On December 2, 2009 2:31:12 AM -0800 Frank Cusack <fcusack@fcusack.com> wrote:
If you want to use this patch, you might want to consider using a magic number (e.g. 999) for :days instead of 0, so that users unaware of the magic number can't easily send unthrottled vacation responses. Just change the ^^^^
"Just" is wrong:
if ( ctx->days && senv->duplicate_check != NULL ) {
part to be
if ( ctx->days != 999 && senv->duplicate_check != NULL ) {
oh sorry, that wouldn't work because if :days were 0 then the dup check would still happen and the throttling would simply be limited to one response per second as opposed to unlimited. But to make it work, just remove the #ifdefs (the rest of the patch) and ONLY include the above part of the patch. Then, :days 0 won't be allowed just as in the spec, however the magic value of :days will mean, no throttlling.
-frank