On Sun, May 11, 2014 at 11:44 AM, Amos Jeffries <squ...@treenet.co.nz> wrote: > On 11/05/2014 9:17 a.m., Kinkie wrote: >> On Fri, May 9, 2014 at 3:35 PM, Amos Jeffries <squ...@treenet.co.nz> wrote: >>> On 5/09/2013 6:23 a.m., Kinkie wrote: >>>> Hi all, >>>> I've developed a new external_acl helper. Its purpose is to add an >>>> artificial delay to requests flowing through squid. It is orthogonal >>>> to delay pools, the delay is added BEFORE serving the request (which >>>> can then be throttled by delay pools or not). >>>> It uses the multi-slot helper API - it is actually meant to be an >>>> example on how to write a multi-slot helper. >>>> >>>> It's available at lp:~kinkie/squid/delayer >>>> (http://bazaar.launchpad.net/~kinkie/squid/delayer/files) >>>> >>>> If you can find the time to check it out, I'll then prepare an >>>> announcement for squid-users and a wiki page for it. >>>> >>>> Thanks >>>> >>> >>> (following up on IRC request to merge this helper). >>> >>> We are now getting a few squid-users queries about how to prevent fast >>> authentication loops, delaying only MISS's etc so there is some need out >>> there for this helper. >>> >>> Quick audit of the helper find: >>> >>> * Please embed the documentation in pod2man style instead of using >>> standalone README file and internal # comments. >>> You can find examples of this in most of the existing bundled helpers. >>> for example helpers/basic_auth/DB/basic_db_auth.pl.in >>> >>> * Please remove the old squid copyright. Claim for yourself in the >>> pod2man position at end of file for bundled perl helpers please. >>> >>> Have not reviewed the perl code at this point. >> >> Hi, >> both done. >> > > More audit: > > * s/external auth helper/external acl helper/
Ok > * for command line options please support and prefer long names. > --debug, --delay, --log etc Done. > * I am trying to make the short -d option mean debug and -v mean > verbosity level across all helpers. > - A simple helper like this does not really need levels of verbosity. > Can you please change -v to -d|--debug and pick a different short name > for the delay period? -w|--wait might be appropriate. Done. > * "gets as input the input received by squid AS RECEIVED FROM SQUID" > makes little sense still. > - Perhapse "gets the full line received from Squid" > - Please also use '.' and capitals where appropriate to make it clearly > a paragraph. Ok > (sorry perhapse I should have reminded you earlier of this: > http://wiki.squid-cache.org/ProgrammingGuide/ManualDocumentation) Needed some adaptation and some sections seem redundant for such a small project, but done. > * SYNOPSIS should only contain the one-liner command-line grammar(s), > may contain multiple one-liners if there are different modes of > opearation. The detail explanations of each switch should be in OPTIONS. Ok. > * the squid.conf documentation, paragraphs 2-4, currently in DESCRIPTION > should be titled CONFIGURATION. Done. > * README is now obsolete, it needs to go. Will disappear once I integrate with squid source tree and facilities (e.g. @PERL@, manpage generation etc). > * the $mydoc thing should probably go down below the boilerplate in the > code area. Moved to end. > - is there any way we can make -h extract the pod2man details for > displaying as help text without duplicating? There's way too much stuff in there for an help message, unfortunately. Thanks -- Francesco