From a14a8b6e5f9dca99261b91f2fbb24f546d92d403 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 2 Apr 2010 20:48:09 +0000 Subject: [PATCH] fixed an debug iterator assert in test --- test/setup_transfer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/setup_transfer.cpp b/test/setup_transfer.cpp index a25c2eac4..4b8a2ce9a 100644 --- a/test/setup_transfer.cpp +++ b/test/setup_transfer.cpp @@ -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);