Fix HTTPRequest blocking indefinitely under certain circumstances
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 24 Oct 2014 16:22:26 +0000 (18:22 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 24 Oct 2014 16:22:26 +0000 (18:22 +0200)
commit7ced4c6ab73c04af30b89de55cc8b83c8746403a
tree162454149efebb9fd576a042b46d8d3c2ef7f102
parentd258c5ed329acef144ec608be277c3e9f8a51ac0
Fix HTTPRequest blocking indefinitely under certain circumstances

If a misbehaving server is ignoring our Connection: Close and the
reply does not contain a newline fgets() will block. Now the content
length is explicitly checked and only the needed bytes are read, instead
of relying on a proper EOF.
wcfsetup/install/files/lib/util/HTTPRequest.class.php