Hi,
recently I got the same error with TidHttp because the server responded with a Transfer Encoding chunked header, but the response did not contain the hex encoded chunk len lines. So the read routine tried to read the first very long text line as chunk len and this leads to the exception. May be the server has the same problem if the client posts data with the header set chunked, but the post stream is not chunked.