[BUGFIX] Parse complete response headers from server.

This is especially important when following the 30X redirects. The
current bug caused the incomplete parsing of response headers, thereby
missing the "Location" header that contains the redirect URL.

Change-Id: I61bd5ae6f201b433d684837e8f3404c5166ba8da
Reviewed-on: https://review.typo3.org/29661
Reviewed-by: Roland Behme
Tested-by: Roland Behme