test-http-bad-server: refactor the reading logic to avoid early return
Our ultimate goal is to add another way to define the connection needs to be
closed. To do so, we need the "read" code to be more unified.
Differential Revision: https://phab.mercurial-scm.org/D12045
#require docutils gettext
$ $TESTDIR/check-gendoc zh_TW
checking for parse errors