• Timothy B. Terriberry's avatar
    Some http improvements. · 7b2cc5f1
    Timothy B. Terriberry authored
    - Attempt to re-use connections when we've already received enough
       data to do so immediately.
    - Make sure when seeking near the end, if the current chunk size is
       such that the _next_ chunk will be half the normal size or less,
       we just ask for the rest of the resource.
    With these two changes, a normal open of a single-chain Opus-only
     file requires exactly two HTTP requests.
    - Also use the response buffer as a dummy buffer when skipping
      This will avoid helgrind errors for multiple writes from
       different threads without locking (should someone be reading
       multiple streams from different threads).
      It's also better for SMP cache contention.