The responseText variable can be truncated

In some cases, the responseText variable may be truncated so the MessageEvent at the end of the response can be not dispatched. If this happens, the new responseText is appended to the lines which were not processed so it is possible to have a consistent message.