mirror of
https://github.com/CrowCpp/Crow.git
synced 2024-06-07 21:10:44 +00:00
fixed issues with static wariables
This commit is contained in:
parent
51a8a977d9
commit
ce7d08eb0e
1
Testing/Temporary/CTestCostData.txt
Normal file
1
Testing/Temporary/CTestCostData.txt
Normal file
@ -0,0 +1 @@
|
||||
---
|
3
Testing/Temporary/LastTest.log
Normal file
3
Testing/Temporary/LastTest.log
Normal file
@ -0,0 +1,3 @@
|
||||
Start testing: Feb 18 22:20 MSK
|
||||
----------------------------------------------------------
|
||||
End testing: Feb 18 22:20 MSK
|
@ -1,3 +1,4 @@
|
||||
#define CROW_MAIN_
|
||||
#include "crow.h"
|
||||
|
||||
#include <sstream>
|
||||
|
@ -1,3 +1,4 @@
|
||||
#define CROW_MAIN_
|
||||
#include "crow.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -1,3 +1,4 @@
|
||||
#define CROW_MAIN_
|
||||
#include "crow.h"
|
||||
#include "crow/compression.h"
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
//#define CROW_STATIC_DRIECTORY "alternative_directory/"
|
||||
//#define CROW_STATIC_ENDPOINT "/alternative_endpoint/<path>"
|
||||
#define CROW_MAIN_
|
||||
#include "crow.h"
|
||||
|
||||
int main()
|
||||
|
@ -1,3 +1,4 @@
|
||||
#define CROW_MAIN_
|
||||
#include "crow.h"
|
||||
|
||||
#include <sstream>
|
||||
|
@ -1,3 +1,4 @@
|
||||
#define CROW_MAIN_
|
||||
#include "crow_all.h"
|
||||
|
||||
#include <sstream>
|
||||
|
@ -1,3 +1,4 @@
|
||||
#define CROW_MAIN_
|
||||
#include "crow.h"
|
||||
|
||||
int main()
|
||||
|
@ -1,4 +1,5 @@
|
||||
#define CROW_ENABLE_SSL
|
||||
#define CROW_MAIN_
|
||||
#include "crow.h"
|
||||
|
||||
int main()
|
||||
|
@ -1,3 +1,4 @@
|
||||
#define CROW_MAIN_
|
||||
#include "crow.h"
|
||||
#include <unordered_set>
|
||||
#include <mutex>
|
||||
|
@ -29,7 +29,10 @@
|
||||
|
||||
namespace crow
|
||||
{
|
||||
#ifdef CROW_MAIN_
|
||||
int detail::dumb_timer_queue::tick = 5;
|
||||
#endif
|
||||
|
||||
#ifdef CROW_ENABLE_SSL
|
||||
using ssl_context_t = boost::asio::ssl::context;
|
||||
#endif
|
||||
|
@ -19,7 +19,7 @@ namespace crow
|
||||
GZIP = 15|16,
|
||||
};
|
||||
|
||||
std::string compress_string(std::string const & str, algorithm algo)
|
||||
inline std::string compress_string(std::string const & str, algorithm algo)
|
||||
{
|
||||
std::string compressed_str;
|
||||
z_stream stream{};
|
||||
@ -56,7 +56,7 @@ namespace crow
|
||||
return compressed_str;
|
||||
}
|
||||
|
||||
std::string decompress_string(std::string const & deflated_string)
|
||||
inline std::string decompress_string(std::string const & deflated_string)
|
||||
{
|
||||
std::string inflated_string;
|
||||
Bytef tmp[8192];
|
||||
|
@ -12,6 +12,7 @@ namespace crow
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
|
||||
/// Fast timer queue for fixed tick value.
|
||||
class dumb_timer_queue
|
||||
{
|
||||
|
@ -3,6 +3,8 @@
|
||||
#include <string>
|
||||
|
||||
namespace crow {
|
||||
|
||||
#ifdef CROW_MAIN_
|
||||
std::unordered_map<std::string, std::string> mime_types {
|
||||
{"shtml", "text/html"},
|
||||
{"htm", "text/html"},
|
||||
@ -113,4 +115,7 @@ namespace crow {
|
||||
{"wmv", "video/x-ms-wmv"},
|
||||
{"avi", "video/x-msvideo"}
|
||||
};
|
||||
#else
|
||||
extern std::unordered_map<std::string, std::string> mime_types;
|
||||
#endif
|
||||
}
|
||||
|
1156
include/crow/tags
Normal file
1156
include/crow/tags
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#define CROW_LOG_LEVEL 0
|
||||
#define CROW_MAIN_
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <iostream>
|
||||
|
Loading…
Reference in New Issue
Block a user