Timur Irmatov wrote:
> According to documentation, parse_query/1 returns a list of tuples
> with variable name (atom) and value (list) form request.
Which docs ?
> But erlang has a limit of 1 million atoms, and they are not garbage
> collected. That means that if somebody will perform one query per
> second with 50 random variables in query string, it will take about
> six ours to bring the Yaws server down..
> Am I right?
Not quite, parse_query used to do this quite a long time ago
but this was changed over a year ago. Ther still does exist
a /etc/yaws.conf flag that can be set to emulate the old
backwards_compat_parse = true
The default is no not generate atoms.
> If so, shouldn't that function be either removed or marked with a warning?
Pretty central function .. that is.
> There is function queryvar/2 that returns a value of a specific
> variable or undefined if parameter with given name is not present.
> Does it under cover execute parse_query
or otherwise create arbitrary
> atoms from query string?