1. 13 Aug, 2014 3 commits
    • Martin Storsjö's avatar
      configure: Check for nanosleep in headers as well, not only in libs · 72199e10
      Martin Storsjö authored
      On mingw64 with c++11 support, the link libraries do contain a
      nanosleep function, while it isn't exposed via the headers. Using
      check_func_headers instead of a plain check_func fixes this
      misdetection.
      Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
      72199e10
    • Martin Storsjö's avatar
      w32threads: Use newer thread synchronization functions when targeting Vista · 428b0578
      Martin Storsjö authored
      When explicitly targeting Vista or newer (which only happens if the
      caller explicitly sets _WIN32_WINNT to a high enough value via the
      extra cflags option - otherwise configure script sets
      -D_WIN32_WINNT=0x0502), we already unconditionally link to the
      ConditionVariable functions, since 4622f11f.
      
      Similarly use the newer -Ex versions of CreateEvent, CreateSemaphore,
      InitializeCriticalSection and WaitForSingleObject, that all appeared
      in Vista. When building Windows Store applications, the older versions
      of these functions aren't available, only the -Ex functions. When
      doing such a build, the user can set -D_WIN32_WINNT=0x0600 to
      forcibly use the newer functions instead.
      Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
      428b0578
    • Martin Storsjö's avatar
      http: Stop reading after receiving the whole file for non-chunked transfers · 8bf3bf69
      Martin Storsjö authored
      Previously this logic was only used if the server didn't
      respond with Connection: close, but use it even for that case,
      if the server response is non-chunked.
      
      Originally the http code has relied on Connection: close to close
      the socket when the file/stream is received - the http protocol
      code just kept reading from the socket until the socket was closed.
      In f240ed18 we added a check for the file size, because some
      http servers didn't respond with Connection: close (and wouldn't
      close the socket) even though we requested it, which meant that the
      http protocol blocked for a long time at the end of files, waiting
      for a socket level timeout.
      
      When reading over tls, trying to read at the end of the connection,
      when the peer has closed the connection, can produce spurious (but
      harmless) warnings. Therefore always voluntarily stop reading when
      the specified file size has been received, if not using a chunked
      transfer encoding. (For chunked transfers, we already return 0
      as soon as we get the chunk header indicating end of stream.)
      Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
      8bf3bf69
  2. 12 Aug, 2014 8 commits
  3. 10 Aug, 2014 10 commits
  4. 09 Aug, 2014 14 commits
  5. 08 Aug, 2014 5 commits