prototypejs / prototype

Prototype JavaScript framework
http://prototypejs.org/
Other
3.54k stars 639 forks source link

Ajax query string, Hash.toQueryPair, and mod_perl #309

Open trevor-indosoft opened 8 years ago

trevor-indosoft commented 8 years ago

I came across an issue with Ajax requests handled by mod_perl yesterday that may need to be addressed. Currently, toQueryPair returns only the key if the value is undefined. This can result in a query string along the lines of key1=value1&key2=value2&key3&key4=value4 being interpreted as ('key1' => 'value1', 'key2' => 'value2', 'key3&key4' => 'value4'). Simply adding an equal sign remedies the problem -- key1=value1&key2=value2&key3=&key4=value4 is interpreted as ('key1' => 'value1', 'key2' => 'value2', 'key3' => '', 'key4' => 'value4')