Fix parsing params: multiple params of same name merged into array

e.g. `a=1&a=2` becomes `{ 'a' => [1, 2] }`
Work around bug in ruby web servers: Ensure Content-Length of 0 when empty body