Revert "abort decoding query string on bad values"

This reverts commit 4809beaad7cdbc4543d92ed4f911ff8f469a3f6d.
Remove invalid commands from buffer

This should hopefully solve the issue from 4809beaad7.