Make http_client compile in C++11 and above (#714)

* Make http_client compile in C++11 and above

* Optimize file reading
This commit is contained in:
Morosko 2017-07-18 15:33:27 +02:00 committed by Davis E. King
parent fc92774687
commit 6525344fb8
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@
namespace dlib
{
typedef dlib::shared_ptr<dlib::timeout> timeout_ptr;
typedef std::shared_ptr<dlib::timeout> timeout_ptr;
#ifdef _MSC_VER
@ -456,7 +456,7 @@ namespace dlib
std::ifstream in(si->second.c_str());
postBody << "--" << mime_boundary << "\r\n"
"Content-Disposition: form-data; name=\"" << ci->first << "\"; filename=\"" << get_basename(si->second) << "\"\r\n\r\n"
<< in << "\r\n";
<< in.rdbuf() << "\r\n";
}
}