Fix EOF detection

    Well sort of.
    Makes assumption that server uses "Content length:" header.
    This allows us to detect when there is no more data.