bugfix bug in connection handling
implement content length reader for event driven stream