You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.
Hello !
I wrote a simple http server using served. Found two issues.
1、Visual studio mode debugging, chrome open url http://localhost:8123/
The program will crash
Crash location: asio\include\asio\buffer.hpp
~buffer_debug_check()
{
#if defined(ASIO_MSVC) && (ASIO_MSVC == 1400)
// MSVC 8's string iterator checking may crash in a std::string::iterator
// object's destructor when the iterator points to an already-destroyed
// std::string object, unless the iterator is cleared first.
Iter_ = Iterator();
#endif //defined(ASIO_MSVC) && (ASIO_MSVC == 1400)
}
Void operator()()
{
(void)*iter_;
}
2、Use release to run normally, but opening the page is very slow, sometimes loading resources fails
Sample code is as follows:
`
#include <served/served.hpp>
#include <served/plugins.hpp>
#include <io.h>
#include <stdio.h>
#include <direct.h>
#include
#include
inline const char * mime_type(const std::string & path)
{
std::string ext;
size_t pos = path.rfind(".");
if (pos != std::string::npos) {
ext = path.substr(pos, path.size() - pos);
}
}
int main(int argc, char *argv[])
{
served::multiplexer mux;
mux.use_after(served::plugin::access_log);
std::string htdocs = argv[1];
}
`
The text was updated successfully, but these errors were encountered: