On Feb 11, 2008 6:46 PM, Bernard Li <[EMAIL PROTECTED]> wrote:
> Hi Alex:
> BTW, I am going to check in the patches for trunk, however, I will
> rename clean_float() to clean_number() since the function name and the
> comment seems a bit misleading based on its call to is_numeric (i.e.
> it is not really checking whether it is a valid float, just a valid
> number).

In the meantime, I started on a patch to put all of the variable
checks and sanitation in one place.  The various clean_* checks are
not directly part of it, and could be removed if not needed.  This
brings up the question:  are we "checking" or "cleaning?"

For example, if the query string has the key/value pair  "st=ABC123"
what do we want to do?  The "st" variable is for the graph start time,
in epoch seconds, so it should always be an integer.  Do we want the
validation routines to warn/fail because it isn't of the desired type,
or should it try to "clean" the data, and return what it can (in this
case, "123")?  The former is more strict, and less likely to cause
strange problems due to malformed data (a graph from 123 seconds after
the epoch to "now" probably isn't what you want).

-- 
Jesse Becker
GPG Fingerprint -- BD00 7AA4 4483 AFCC 82D0  2720 0083 0931 9A2B 06A2

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to