Backpatch from 1.0

commit 86ba10b5b46cd01cc6c0544c332a4b22f130d9ba
Author: TJ Koblentz <tj.koblentz@gmail.com>
Date:   Wed Apr 9 11:45:11 2014 +0400

    Be more consistent and slightly more lenient when handling GET params

    Fixes an inconsistency when passed length of buffer without NUL terminating
    character (ie. "this_key_is_present=&but_this_one_is_not=").

    Also handles the "key" without = case by ignoring the key.

    Signed-off-by: Mark Ellzey <socket@gmail.com>