forked from TechEmpower/FrameworkBenchmarks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
5,796 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
frameworks/C++/paozhu/paozhu_benchmark/common/autorestfulpaths.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
#ifndef __HTTP_AUTO_REG_CONTROL_HTTPRESTFUL_HPP | ||
#define __HTTP_AUTO_REG_CONTROL_HTTPRESTFUL_HPP | ||
|
||
#if defined(_MSC_VER) && (_MSC_VER >= 1200) | ||
#pragma once | ||
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) | ||
|
||
#include "httppeer.h" | ||
|
||
|
||
|
||
namespace http | ||
{ | ||
void _initauto_control_httprestful_paths(std::map<std::string, std::vector<std::string>> &restfulmethod) | ||
{ | ||
|
||
|
||
if(restfulmethod.size()) | ||
{} | ||
|
||
|
||
} | ||
|
||
void _initauto_domain_httprestful_paths(std::map<std::string,std::map<std::string, std::vector<std::string>>> &restfulmethod) | ||
{ | ||
std::map<std::string, std::vector<std::string>> temp_path; | ||
std::map<std::string,std::map<std::string, std::vector<std::string>>>::iterator domain_iterator; | ||
|
||
domain_iterator=restfulmethod.begin(); | ||
temp_path.clear(); | ||
|
||
|
||
} | ||
|
||
} | ||
|
||
#endif | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#pragma once | ||
#ifndef _CONST_DEFINE_FUNC_H | ||
#define _CONST_DEFINE_FUNC_H | ||
|
||
#define CONST_MONEY_PART 1000000 | ||
#define CONST_HTTP_HEADER_BODY_SIZE 16384 | ||
#define CONST_PHP_BODY_POST_SIZE 16777216 | ||
|
||
#endif |
39 changes: 39 additions & 0 deletions
39
frameworks/C++/paozhu/paozhu_benchmark/common/httphook.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#include <iostream> | ||
#include <list> | ||
#include <map> | ||
#include <mutex> | ||
#include <queue> | ||
#include <string> | ||
#include <thread> | ||
#include <memory> | ||
#include <string_view> | ||
#include "httppeer.h" | ||
namespace http | ||
{ | ||
std::map<std::string, bool> _block_ip_tables; | ||
std::map<std::string, bool> _block_host_tables; | ||
bool check_blockip(const std::string &client_ip) | ||
{ | ||
if (client_ip.size() > 0) | ||
{ | ||
return false; | ||
} | ||
return false; | ||
} | ||
bool hook_host_http1(std::shared_ptr<httppeer> peer) | ||
{ | ||
if (peer->host.size() > 0) | ||
{ | ||
return false; | ||
} | ||
return false; | ||
} | ||
bool hook_host_http2(std::shared_ptr<httppeer> peer) | ||
{ | ||
if (peer->host.size() > 0) | ||
{ | ||
return false; | ||
} | ||
return false; | ||
} | ||
}// namespace http |
Empty file modified
0
frameworks/C++/paozhu/paozhu_benchmark/common/json_reflect_headers.h
100644 → 100755
Empty file.
Oops, something went wrong.