[Oisf-devel] libhtp - do not store non key-value param in query

Ivan Ristic ivan.ristic at gmail.com
Mon Jun 17 13:03:57 UTC 2013


On Mon, Jun 17, 2013 at 9:24 AM, Anoop Saldanha <anoopsaldanha at gmail.com> wrote:
> On Mon, Jun 17, 2013 at 1:52 PM, Anoop Saldanha <anoopsaldanha at gmail.com> wrote:
>> ?name1&name2=value2
>> ?name1=&name2=value2
>>
>> In both these query strings, for param "name1", param->value is
>> non-NULL and len 0.
>>
>> Maybe for the first query string, we should set the param->value
>> as NULL, so that we can differentiate it from the second query where
>> name1 is in the key-value format but without the value set?

I don't find it natural to use NULL. In both cases the parameter
exists, which -- to me -- means it has to have a value.

Do you have a use case where the difference matters?

It's not a change I would want to introduce in 0.5.x, because at the
moment value is guaranteed/expected to not be NULL.


> P.S: I have also asked the above question in the mail thread - "libhtp
> 0.5.x integration - bug 775" on oisf-devel.  Please ignore that.
>
> --
> -------------------------------
> Anoop Saldanha
> http://www.poona.me
> -------------------------------



-- 
Ivan Ristić



More information about the Oisf-devel mailing list