mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 09:18:27 +00:00
Unit test for #52
This commit is contained in:
parent
3c711089e5
commit
9dc4e23082
2 changed files with 20 additions and 0 deletions
|
@ -205,6 +205,8 @@ public:
|
|||
bool is_running() const;
|
||||
void stop();
|
||||
|
||||
bool is_handling_requests() const;
|
||||
|
||||
protected:
|
||||
bool process_request(Stream& strm, bool last_connection);
|
||||
|
||||
|
@ -1482,6 +1484,11 @@ inline void Server::stop()
|
|||
svr_sock_ = -1;
|
||||
}
|
||||
|
||||
inline bool Server::is_handling_requests() const
|
||||
{
|
||||
return running_threads_ > 0;
|
||||
}
|
||||
|
||||
inline bool Server::parse_request_line(const char* s, Request& req)
|
||||
{
|
||||
static std::regex re("(GET|HEAD|POST) ([^?]+)(?:\\?(.+?))? (HTTP/1\\.[01])\r\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue