fixed an debug iterator assert in test

This commit is contained in:
Arvid Norberg 2010-04-02 20:48:09 +00:00
parent ccb808638d
commit a14a8b6e5f
1 changed files with 2 additions and 1 deletions

View File

@ -766,7 +766,8 @@ void web_server_thread(int* port, bool ssl)
else
{
send_response(s, ec, 200, "OK", extra_header, file_buf.size());
write(s, boost::asio::buffer(&file_buf[0], file_buf.size()), boost::asio::transfer_all(), ec);
if (!file_buf.empty())
write(s, boost::asio::buffer(&file_buf[0], file_buf.size()), boost::asio::transfer_all(), ec);
}
// fprintf(stderr, "%d bytes left in receive buffer. offset: %d\n", len - offset, offset);
} while (offset < len);