Issue #1 new

Concatenating of binaries when we don't know the content length

Anonymous created an issue

When we don't know the content length we read until the socket is closed (in case we can find the Connection: close header or it's a HTTP version < 1.1). It might be more efficient to do this without concatenating binaries, for instance [Bin, Acc] and then iolist_to_binary(Acc) in the end...

This was pointed out by Chris Newcombe, thanks :)

Comments (3)

  1. Anonymous

    Tried to do some benchmarks, but got very unreliable data out of it so I think I need to do something on a larger scale to find out if this really is a problem. However, with the introduction of chunked download, we now do this in two different ways, which I don't really like.

  2. Log in to comment