Both name and value must be uri-encoded.
Added a todo.
Keep it DRY