Move runtime/base/server to runtime/server
This is an incremental step towards moving it all the way to hphp/server. This flattens base but doesn't untangle the server files from lib_hphp_runtime
Esse commit está contido em:
@@ -22,7 +22,7 @@ SET(USE_HHVM TRUE)
|
||||
SET(ENV{HHVM} 1)
|
||||
ADD_DEFINITIONS("-DHHVM -DHHVM_BINARY=1 -DHHVM_PATH=\\\"${HPHP_HOME}/hphp/hhvm/hhvm\\\"")
|
||||
|
||||
set(RECURSIVE_SOURCE_SUBDIRS runtime/base runtime/debugger runtime/eval runtime/ext runtime/vm util)
|
||||
set(RECURSIVE_SOURCE_SUBDIRS runtime/base runtime/debugger runtime/eval runtime/ext runtime/server runtime/vm util)
|
||||
foreach (dir ${RECURSIVE_SOURCE_SUBDIRS})
|
||||
|
||||
auto_sources(files "*.cpp" "RECURSE" "${CMAKE_CURRENT_SOURCE_DIR}/${dir}")
|
||||
@@ -40,6 +40,9 @@ if(NOT LINUX)
|
||||
list(REMOVE_ITEM CXX_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/runtime/vm/debug/elfwriter.cpp)
|
||||
endif()
|
||||
|
||||
# Not working with off-the-shelf libevent
|
||||
list(REMOVE_ITEM CXX_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/runtime/server/server_name_indication.cpp)
|
||||
|
||||
# remove ext_hhvm, and anything in a test folder
|
||||
foreach (file ${CXX_SOURCES})
|
||||
if (${file} MATCHES "ext_hhvm")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
<h2>Server Documents</h2>
|
||||
|
||||
This flow is implemented in hphp/runtime/base/server/http_server.cpp:
|
||||
This flow is implemented in hphp/runtime/server/http_server.cpp:
|
||||
|
||||
+-------------+
|
||||
| APC Priming |
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/debuggable.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "hphp/runtime/base/array_iterator.h"
|
||||
#include "hphp/runtime/base/memory/memory_manager.h"
|
||||
#include "hphp/runtime/base/memory/sweepable.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/base/util/request_local.h"
|
||||
#include "hphp/runtime/base/builtin_functions.h"
|
||||
#include "hphp/runtime/base/comparisons.h"
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
|
||||
#include "hphp/runtime/base/class_info.h"
|
||||
#include "hphp/runtime/base/complex_types.h"
|
||||
#include "hphp/runtime/base/server/transport.h"
|
||||
#include "hphp/runtime/server/transport.h"
|
||||
#include "hphp/runtime/base/resource_data.h"
|
||||
#include "hphp/runtime/base/debuggable.h"
|
||||
#include "hphp/runtime/base/server/virtual_host.h"
|
||||
#include "hphp/runtime/server/virtual_host.h"
|
||||
#include "hphp/runtime/base/util/string_buffer.h"
|
||||
#include "hphp/runtime/base/hphp_array.h"
|
||||
#include "hphp/runtime/vm/funcdict.h"
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
#include "hphp/runtime/base/util/string_buffer.h"
|
||||
#include "hphp/runtime/base/type_conversions.h"
|
||||
#include "hphp/runtime/base/builtin_functions.h"
|
||||
#include "hphp/runtime/base/server/static_content_cache.h"
|
||||
#include "hphp/runtime/base/server/virtual_host.h"
|
||||
#include "hphp/runtime/server/static_content_cache.h"
|
||||
#include "hphp/runtime/server/virtual_host.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/runtime_error.h"
|
||||
#include "hphp/runtime/base/array_init.h"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "hphp/runtime/base/file/file_stream_wrapper.h"
|
||||
#include "hphp/runtime/base/runtime_error.h"
|
||||
#include "hphp/runtime/base/file/plain_file.h"
|
||||
#include "hphp/runtime/base/server/static_content_cache.h"
|
||||
#include "hphp/runtime/server/static_content_cache.h"
|
||||
#include <memory>
|
||||
|
||||
namespace HPHP {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "hphp/runtime/base/file/mem_file.h"
|
||||
#include "hphp/runtime/base/complex_types.h"
|
||||
#include "hphp/runtime/base/util/http_client.h"
|
||||
#include "hphp/runtime/base/server/static_content_cache.h"
|
||||
#include "hphp/runtime/server/static_content_cache.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/util/compression.h"
|
||||
#include "hphp/util/logger.h"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "hphp/runtime/base/util/exceptions.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/complex_types.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/base/util/request_local.h"
|
||||
#include "hphp/util/logger.h"
|
||||
#include <fcntl.h>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "hphp/util/process.h"
|
||||
#include "hphp/util/trace.h"
|
||||
#include "hphp/runtime/base/stat_cache.h"
|
||||
#include "hphp/runtime/base/server/source_root_info.h"
|
||||
#include "hphp/runtime/server/source_root_info.h"
|
||||
|
||||
#include "hphp/runtime/vm/jit/target-cache.h"
|
||||
#include "hphp/runtime/vm/jit/translator.h"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "hphp/runtime/base/memory/leak_detectable.h"
|
||||
#include "hphp/runtime/base/program_functions.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include <stdlib.h>
|
||||
#include "tbb/concurrent_hash_map.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "hphp/runtime/base/memory/sweepable.h"
|
||||
#include "hphp/runtime/base/builtin_functions.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/server/http_server.h"
|
||||
#include "hphp/runtime/server/http_server.h"
|
||||
#include "hphp/util/alloc.h"
|
||||
#include "hphp/util/process.h"
|
||||
#include "hphp/util/trace.h"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "hphp/runtime/base/memory/smart_allocator.h"
|
||||
#include "hphp/runtime/base/memory/memory_manager.h"
|
||||
#include "hphp/runtime/base/resource_data.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/util/logger.h"
|
||||
#include "hphp/util/trace.h"
|
||||
|
||||
@@ -23,14 +23,14 @@
|
||||
#include "hphp/runtime/base/code_coverage.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/util/shared_memory_allocator.h"
|
||||
#include "hphp/runtime/base/server/pagelet_server.h"
|
||||
#include "hphp/runtime/base/server/xbox_server.h"
|
||||
#include "hphp/runtime/base/server/http_server.h"
|
||||
#include "hphp/runtime/base/server/replay_transport.h"
|
||||
#include "hphp/runtime/base/server/http_request_handler.h"
|
||||
#include "hphp/runtime/base/server/admin_request_handler.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/base/server/server_note.h"
|
||||
#include "hphp/runtime/server/pagelet_server.h"
|
||||
#include "hphp/runtime/server/xbox_server.h"
|
||||
#include "hphp/runtime/server/http_server.h"
|
||||
#include "hphp/runtime/server/replay_transport.h"
|
||||
#include "hphp/runtime/server/http_request_handler.h"
|
||||
#include "hphp/runtime/server/admin_request_handler.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_note.h"
|
||||
#include "hphp/runtime/base/memory/memory_manager.h"
|
||||
#include "hphp/util/process.h"
|
||||
#include "hphp/util/capability.h"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "hphp/runtime/base/type_conversions.h"
|
||||
#include "hphp/runtime/base/builtin_functions.h"
|
||||
#include "hphp/runtime/base/shared/shared_store_base.h"
|
||||
#include "hphp/runtime/base/server/access_log.h"
|
||||
#include "hphp/runtime/server/access_log.h"
|
||||
#include "hphp/runtime/base/memory/leak_detectable.h"
|
||||
#include "hphp/runtime/base/util/extended_logger.h"
|
||||
#include "hphp/runtime/base/util/simple_counter.h"
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "hphp/runtime/base/hardware_counter.h"
|
||||
#include "hphp/runtime/base/preg.h"
|
||||
#include "hphp/util/parser/scanner.h"
|
||||
#include "hphp/runtime/base/server/access_log.h"
|
||||
#include "hphp/runtime/server/access_log.h"
|
||||
#include "hphp/runtime/base/crash_reporter.h"
|
||||
|
||||
namespace HPHP {
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
#ifndef incl_HPHP_RUNTIME_OPTION_H_
|
||||
#define incl_HPHP_RUNTIME_OPTION_H_
|
||||
|
||||
#include "hphp/runtime/base/server/virtual_host.h"
|
||||
#include "hphp/runtime/base/server/satellite_server.h"
|
||||
#include "hphp/runtime/base/server/files_match.h"
|
||||
#include "hphp/runtime/server/virtual_host.h"
|
||||
#include "hphp/runtime/server/satellite_server.h"
|
||||
#include "hphp/runtime/server/files_match.h"
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/type_conversions.h"
|
||||
#include "hphp/runtime/base/builtin_functions.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "tbb/concurrent_hash_map.h"
|
||||
#include "tbb/concurrent_priority_queue.h"
|
||||
#include "hphp/runtime/base/shared/shared_store_stats.h"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "hphp/runtime/base/type_conversions.h"
|
||||
#include "hphp/runtime/base/builtin_functions.h"
|
||||
#include "hphp/runtime/base/memory/leak_detectable.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/base/shared/concurrent_shared_store.h"
|
||||
#include "hphp/util/timer.h"
|
||||
#include "hphp/util/logger.h"
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
#include "hphp/runtime/base/memory/smart_allocator.h"
|
||||
#include "hphp/runtime/base/execution_context.h"
|
||||
#include "hphp/runtime/base/preg.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/base/server/server_note.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_note.h"
|
||||
#include "hphp/runtime/base/zend/zend_strtod.h"
|
||||
#include "hphp/runtime/base/zend/zend_math.h"
|
||||
#include "hphp/util/async_func.h"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "hphp/runtime/base/util/http_client.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/base/util/curl_tls_workarounds.h"
|
||||
#include "hphp/util/timer.h"
|
||||
#include "curl/curl.h"
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
#define incl_HPHP_HTTP_CLIENT_H_
|
||||
|
||||
#include "hphp/runtime/base/util/string_buffer.h"
|
||||
#include "hphp/runtime/base/server/transport.h"
|
||||
#include "hphp/runtime/server/transport.h"
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class HttpClient {
|
||||
public:
|
||||
HttpClient(int timeout = 5 /* seconds */, int maxRedirect = 1,
|
||||
bool use11 = true, bool decompress = false);
|
||||
explicit HttpClient(int timeout = 5 /* seconds */, int maxRedirect = 1,
|
||||
bool use11 = true, bool decompress = false);
|
||||
|
||||
/**
|
||||
* Authentication.
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/util/libevent_http_client.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/util/compression.h"
|
||||
#include "hphp/util/logger.h"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "hphp/runtime/debugger/debugger.h"
|
||||
#include "hphp/runtime/debugger/cmd/cmd_signal.h"
|
||||
#include "hphp/runtime/base/program_functions.h"
|
||||
#include "hphp/runtime/base/server/source_root_info.h"
|
||||
#include "hphp/runtime/server/source_root_info.h"
|
||||
#include "hphp/runtime/base/externals.h"
|
||||
#include "hphp/runtime/base/hphp_system.h"
|
||||
#include "hphp/util/logger.h"
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/ext/ext_apache.h"
|
||||
#include "hphp/runtime/base/server/http_server.h"
|
||||
#include "hphp/runtime/server/http_server.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/server/server_note.h"
|
||||
#include "hphp/runtime/base/server/transport.h"
|
||||
#include "hphp/runtime/server/server_note.h"
|
||||
#include "hphp/runtime/server/transport.h"
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "hphp/runtime/base/base_includes.h"
|
||||
#include "hphp/runtime/base/shared/shared_store_base.h"
|
||||
#include "hphp/runtime/base/server/upload.h"
|
||||
#include "hphp/runtime/server/upload.h"
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "hphp/runtime/base/util/libevent_http_client.h"
|
||||
#include "hphp/runtime/base/util/curl_tls_workarounds.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/vm/jit/translator-inline.h"
|
||||
|
||||
#define CURLOPT_RETURNTRANSFER 19913
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "hphp/runtime/base/array_util.h"
|
||||
#include "hphp/runtime/base/util/http_client.h"
|
||||
#include "hphp/runtime/base/util/request_local.h"
|
||||
#include "hphp/runtime/base/server/static_content_cache.h"
|
||||
#include "hphp/runtime/server/static_content_cache.h"
|
||||
#include "hphp/runtime/base/zend/zend_scanf.h"
|
||||
#include "hphp/runtime/base/file/pipe.h"
|
||||
#include "hphp/system/systemlib.h"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "hphp/runtime/ext/ext_closure.h"
|
||||
#include "hphp/runtime/base/class_info.h"
|
||||
#include "hphp/runtime/base/util/libevent_http_client.h"
|
||||
#include "hphp/runtime/base/server/http_protocol.h"
|
||||
#include "hphp/runtime/server/http_protocol.h"
|
||||
#include "hphp/runtime/vm/runtime.h"
|
||||
#include "hphp/runtime/vm/jit/translator.h"
|
||||
#include "hphp/runtime/vm/jit/translator-inline.h"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "hphp/runtime/base/memory/memory_manager.h"
|
||||
#include "hphp/runtime/base/util/request_local.h"
|
||||
#include "hphp/runtime/base/zend/zend_math.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/base/ini_setting.h"
|
||||
#include "hphp/runtime/vm/event_hook.h"
|
||||
#include "hphp/util/alloc.h"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include "hphp/runtime/ext/ext_misc.h"
|
||||
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/base/util/exceptions.h"
|
||||
#include "hphp/runtime/base/zend/zend_pack.h"
|
||||
#include "hphp/runtime/base/hphp_system.h"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "hphp/runtime/ext/mysql_stats.h"
|
||||
#include "hphp/runtime/base/file/socket.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/base/util/request_local.h"
|
||||
#include "hphp/runtime/base/util/extended_logger.h"
|
||||
#include "hphp/util/timer.h"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "hphp/runtime/ext/ext_apc.h"
|
||||
#include "hphp/runtime/ext/ext_string.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/util/lock.h"
|
||||
#include "hphp/runtime/base/file/file.h"
|
||||
#include "netinet/in.h"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#define incl_HPHP_EXT_OUTPUT_H_
|
||||
|
||||
#include "hphp/runtime/base/base_includes.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/ext/ext_server.h"
|
||||
#include "hphp/runtime/base/server/satellite_server.h"
|
||||
#include "hphp/runtime/base/server/pagelet_server.h"
|
||||
#include "hphp/runtime/base/server/xbox_server.h"
|
||||
#include "hphp/runtime/base/server/http_protocol.h"
|
||||
#include "hphp/runtime/server/satellite_server.h"
|
||||
#include "hphp/runtime/server/pagelet_server.h"
|
||||
#include "hphp/runtime/server/xbox_server.h"
|
||||
#include "hphp/runtime/server/http_protocol.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/util/string_buffer.h"
|
||||
#include "hphp/runtime/base/server/rpc_request_handler.h"
|
||||
#include "hphp/runtime/server/rpc_request_handler.h"
|
||||
|
||||
#define DANGLING_HEADER "HPHP_DANGLING"
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include "hphp/runtime/ext/ext_soap.h"
|
||||
#include "hphp/runtime/base/util/http_client.h"
|
||||
#include "hphp/runtime/base/server/http_protocol.h"
|
||||
#include "hphp/runtime/server/http_protocol.h"
|
||||
#include "hphp/runtime/base/class_info.h"
|
||||
#include "hphp/runtime/ext/soap/soap.h"
|
||||
#include "hphp/runtime/ext/soap/packet.h"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "hphp/runtime/ext/ext_socket.h"
|
||||
#include "hphp/runtime/base/file/socket.h"
|
||||
#include "hphp/runtime/base/file/ssl_socket.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "hphp/runtime/base/file/plain_file.h"
|
||||
#include "hphp/runtime/base/util/string_buffer.h"
|
||||
#include "hphp/runtime/base/zend/zend_printf.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/base/file/stream_wrapper.h"
|
||||
#include "hphp/runtime/base/file/stream_wrapper_registry.h"
|
||||
#include "hphp/runtime/base/file/user_stream_wrapper.h"
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
#include "hphp/runtime/base/util/request_local.h"
|
||||
#include "hphp/util/lock.h"
|
||||
#include <locale.h>
|
||||
#include "hphp/runtime/base/server/http_request_handler.h"
|
||||
#include "hphp/runtime/base/server/http_protocol.h"
|
||||
#include "hphp/runtime/server/http_request_handler.h"
|
||||
#include "hphp/runtime/server/http_protocol.h"
|
||||
|
||||
namespace HPHP {
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/ext/ext_thread.h"
|
||||
#include "hphp/runtime/base/server/service_thread.h"
|
||||
#include "hphp/runtime/base/server/http_server.h"
|
||||
#include "hphp/runtime/server/service_thread.h"
|
||||
#include "hphp/runtime/server/http_server.h"
|
||||
#include "hphp/runtime/base/program_functions.h"
|
||||
#include "hphp/util/process.h"
|
||||
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
#include "hphp/runtime/base/server/access_log.h"
|
||||
#include "hphp/runtime/server/access_log.h"
|
||||
#include "hphp/runtime/base/time/datetime.h"
|
||||
#include "hphp/runtime/base/time/timestamp.h"
|
||||
#include <time.h>
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/server/server_note.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/base/server/request_uri.h"
|
||||
#include "hphp/runtime/server/server_note.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/server/request_uri.h"
|
||||
#include "hphp/util/process.h"
|
||||
#include "hphp/util/atomic.h"
|
||||
#include "hphp/util/compatibility.h"
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
int prevBytesWritten;
|
||||
};
|
||||
typedef ThreadData* (*GetThreadDataFunc)();
|
||||
AccessLog(GetThreadDataFunc f) :
|
||||
explicit AccessLog(GetThreadDataFunc f) :
|
||||
m_initialized(false), m_fGetThreadData(f) {}
|
||||
~AccessLog();
|
||||
void init(const std::string &defaultFormat,
|
||||
+4
-4
@@ -14,12 +14,12 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/admin_request_handler.h"
|
||||
#include "hphp/runtime/server/admin_request_handler.h"
|
||||
#include "hphp/runtime/base/file_repository.h"
|
||||
#include "hphp/runtime/base/server/http_server.h"
|
||||
#include "hphp/runtime/base/server/pagelet_server.h"
|
||||
#include "hphp/runtime/server/http_server.h"
|
||||
#include "hphp/runtime/server/pagelet_server.h"
|
||||
#include "hphp/runtime/base/util/http_client.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/preg.h"
|
||||
#include "hphp/util/process.h"
|
||||
+2
-2
@@ -17,8 +17,8 @@
|
||||
#ifndef incl_HPHP_ADMIN_REQUEST_HANDLER_H_
|
||||
#define incl_HPHP_ADMIN_REQUEST_HANDLER_H_
|
||||
|
||||
#include "hphp/runtime/base/server/access_log.h"
|
||||
#include "hphp/runtime/base/server/server.h"
|
||||
#include "hphp/runtime/server/access_log.h"
|
||||
#include "hphp/runtime/server/server.h"
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/dynamic_content_cache.h"
|
||||
#include "hphp/runtime/server/dynamic_content_cache.h"
|
||||
#include "hphp/util/lock.h"
|
||||
#include "hphp/util/compression.h"
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/server/files_match.h"
|
||||
#include "hphp/runtime/base/complex_types.h"
|
||||
#include "hphp/runtime/base/server/files_match.h"
|
||||
#include "hphp/runtime/base/server/virtual_host.h"
|
||||
#include "hphp/runtime/server/virtual_host.h"
|
||||
#include "hphp/runtime/base/preg.h"
|
||||
#include "hphp/util/util.h"
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace HPHP {
|
||||
DECLARE_BOOST_TYPES(FilesMatch);
|
||||
class FilesMatch {
|
||||
public:
|
||||
FilesMatch(Hdf vh);
|
||||
explicit FilesMatch(Hdf vh);
|
||||
|
||||
bool match(const std::string &filename) const;
|
||||
const std::vector<std::string> &getHeaders() const { return m_headers;}
|
||||
+7
-7
@@ -14,20 +14,20 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/http_protocol.h"
|
||||
#include "hphp/runtime/server/http_protocol.h"
|
||||
#include "hphp/runtime/base/hphp_system.h"
|
||||
#include "hphp/runtime/base/zend/zend_url.h"
|
||||
#include "hphp/runtime/base/zend/zend_string.h"
|
||||
#include "hphp/runtime/base/program_functions.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/server/source_root_info.h"
|
||||
#include "hphp/runtime/base/server/request_uri.h"
|
||||
#include "hphp/runtime/base/server/transport.h"
|
||||
#include "hphp/runtime/server/source_root_info.h"
|
||||
#include "hphp/runtime/server/request_uri.h"
|
||||
#include "hphp/runtime/server/transport.h"
|
||||
#include "hphp/util/logger.h"
|
||||
#include "hphp/util/util.h"
|
||||
#include "hphp/runtime/base/server/upload.h"
|
||||
#include "hphp/runtime/base/server/replay_transport.h"
|
||||
#include "hphp/runtime/base/server/virtual_host.h"
|
||||
#include "hphp/runtime/server/upload.h"
|
||||
#include "hphp/runtime/server/replay_transport.h"
|
||||
#include "hphp/runtime/server/virtual_host.h"
|
||||
#include "hphp/runtime/base/util/http_client.h"
|
||||
|
||||
#define DEFAULT_POST_CONTENT_TYPE "application/x-www-form-urlencoded"
|
||||
@@ -18,7 +18,7 @@
|
||||
#define incl_HPHP_HTTP_PROTOCOL_H_
|
||||
|
||||
#include "hphp/runtime/base/complex_types.h"
|
||||
#include "hphp/runtime/base/server/transport.h"
|
||||
#include "hphp/runtime/server/transport.h"
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
+8
-8
@@ -14,21 +14,21 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/http_request_handler.h"
|
||||
#include "hphp/runtime/server/http_request_handler.h"
|
||||
#include "hphp/runtime/base/program_functions.h"
|
||||
#include "hphp/runtime/base/execution_context.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/util/timer.h"
|
||||
#include "hphp/runtime/base/server/static_content_cache.h"
|
||||
#include "hphp/runtime/base/server/dynamic_content_cache.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/static_content_cache.h"
|
||||
#include "hphp/runtime/server/dynamic_content_cache.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/util/network.h"
|
||||
#include "hphp/runtime/base/preg.h"
|
||||
#include "hphp/runtime/ext/ext_function.h"
|
||||
#include "hphp/runtime/base/server/access_log.h"
|
||||
#include "hphp/runtime/base/server/source_root_info.h"
|
||||
#include "hphp/runtime/base/server/request_uri.h"
|
||||
#include "hphp/runtime/base/server/http_protocol.h"
|
||||
#include "hphp/runtime/server/access_log.h"
|
||||
#include "hphp/runtime/server/source_root_info.h"
|
||||
#include "hphp/runtime/server/request_uri.h"
|
||||
#include "hphp/runtime/server/http_protocol.h"
|
||||
#include "hphp/runtime/base/time/datetime.h"
|
||||
#include "hphp/runtime/debugger/debugger.h"
|
||||
#include "hphp/util/alloc.h"
|
||||
+3
-3
@@ -18,9 +18,9 @@
|
||||
#define incl_HPHP_HTTP_REQUEST_HANDLER_H_
|
||||
|
||||
#include "hphp/runtime/base/util/string_buffer.h"
|
||||
#include "hphp/runtime/base/server/virtual_host.h"
|
||||
#include "hphp/runtime/base/server/access_log.h"
|
||||
#include "hphp/runtime/base/server/server.h"
|
||||
#include "hphp/runtime/server/virtual_host.h"
|
||||
#include "hphp/runtime/server/access_log.h"
|
||||
#include "hphp/runtime/server/server.h"
|
||||
|
||||
namespace HPHP {
|
||||
|
||||
@@ -14,20 +14,20 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/http_server.h"
|
||||
#include "hphp/runtime/base/server/http_request_handler.h"
|
||||
#include "hphp/runtime/base/server/admin_request_handler.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/base/server/warmup_request_handler.h"
|
||||
#include "hphp/runtime/base/server/xbox_server.h"
|
||||
#include "hphp/runtime/server/http_server.h"
|
||||
#include "hphp/runtime/server/http_request_handler.h"
|
||||
#include "hphp/runtime/server/admin_request_handler.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/server/warmup_request_handler.h"
|
||||
#include "hphp/runtime/server/xbox_server.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/server/static_content_cache.h"
|
||||
#include "hphp/runtime/server/static_content_cache.h"
|
||||
#include "hphp/runtime/base/class_info.h"
|
||||
#include "hphp/runtime/base/memory/memory_manager.h"
|
||||
#include "hphp/util/logger.h"
|
||||
#include "hphp/runtime/base/externals.h"
|
||||
#include "hphp/runtime/base/util/http_client.h"
|
||||
#include "hphp/runtime/base/server/replay_transport.h"
|
||||
#include "hphp/runtime/server/replay_transport.h"
|
||||
#include "hphp/runtime/base/program_functions.h"
|
||||
#include "hphp/runtime/debugger/debugger.h"
|
||||
#include "hphp/util/db_conn.h"
|
||||
@@ -17,10 +17,10 @@
|
||||
#ifndef incl_HPHP_HTTP_SERVER_H_
|
||||
#define incl_HPHP_HTTP_SERVER_H_
|
||||
|
||||
#include "hphp/runtime/base/server/server.h"
|
||||
#include "hphp/runtime/base/server/satellite_server.h"
|
||||
#include "hphp/runtime/server/server.h"
|
||||
#include "hphp/runtime/server/satellite_server.h"
|
||||
#include "hphp/util/async_func.h"
|
||||
#include "hphp/runtime/base/server/service_thread.h"
|
||||
#include "hphp/runtime/server/service_thread.h"
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -14,7 +14,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/ip_block_map.h"
|
||||
#include "hphp/runtime/server/ip_block_map.h"
|
||||
#include "hphp/util/logger.h"
|
||||
|
||||
namespace HPHP {
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
int &significant_bits);
|
||||
|
||||
public:
|
||||
IpBlockMap(Hdf config);
|
||||
explicit IpBlockMap(Hdf config);
|
||||
|
||||
bool isBlocking(const std::string &command, const std::string &ip) const;
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
// the candidate address is the value for that address's network.
|
||||
class BinaryPrefixTrie {
|
||||
public:
|
||||
BinaryPrefixTrie(bool allow);
|
||||
explicit BinaryPrefixTrie(bool allow);
|
||||
|
||||
// Returns the "allow" value of the longest matching prefix of the
|
||||
// search value.
|
||||
+3
-3
@@ -14,12 +14,12 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/libevent_server.h"
|
||||
#include "hphp/runtime/server/libevent_server.h"
|
||||
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/memory/memory_manager.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/base/server/http_protocol.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/server/http_protocol.h"
|
||||
#include "hphp/runtime/debugger/debugger.h"
|
||||
#include "hphp/util/compatibility.h"
|
||||
#include "hphp/util/logger.h"
|
||||
+3
-3
@@ -17,10 +17,10 @@
|
||||
#ifndef incl_HPHP_HTTP_SERVER_LIB_EVENT_SERVER_H_
|
||||
#define incl_HPHP_HTTP_SERVER_LIB_EVENT_SERVER_H_
|
||||
|
||||
#include "hphp/runtime/base/server/server.h"
|
||||
#include "hphp/runtime/base/server/libevent_transport.h"
|
||||
#include "hphp/runtime/server/server.h"
|
||||
#include "hphp/runtime/server/libevent_transport.h"
|
||||
#include "hphp/runtime/base/timeout_thread.h"
|
||||
#include "hphp/runtime/base/server/job_queue_vm_stack.h"
|
||||
#include "hphp/runtime/server/job_queue_vm_stack.h"
|
||||
#include "hphp/util/job_queue.h"
|
||||
#include "hphp/util/process.h"
|
||||
|
||||
+4
-4
@@ -13,10 +13,10 @@
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
// Copyright 2004-present Facebook. All Rights Reserved.
|
||||
#include "hphp/runtime/base/server/libevent_server.h"
|
||||
#include "hphp/runtime/base/server/libevent_server_with_fd.h"
|
||||
#include "hphp/runtime/base/server/libevent_server_with_takeover.h"
|
||||
|
||||
#include "hphp/runtime/server/libevent_server.h"
|
||||
#include "hphp/runtime/server/libevent_server_with_fd.h"
|
||||
#include "hphp/runtime/server/libevent_server_with_takeover.h"
|
||||
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/libevent_server_with_fd.h"
|
||||
#include "hphp/runtime/server/libevent_server_with_fd.h"
|
||||
#include "hphp/util/logger.h"
|
||||
|
||||
/*
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
#ifndef incl_HPHP_HTTP_SERVER_LIB_EVENT_SERVER_WITH_FD_H_
|
||||
#define incl_HPHP_HTTP_SERVER_LIB_EVENT_SERVER_WITH_FD_H_
|
||||
|
||||
#include "hphp/runtime/base/server/libevent_server.h"
|
||||
#include "hphp/runtime/server/libevent_server.h"
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/libevent_server_with_takeover.h"
|
||||
#include "hphp/runtime/server/libevent_server_with_takeover.h"
|
||||
#include "hphp/util/logger.h"
|
||||
#include "hphp/runtime/base/string_util.h"
|
||||
#include <afdt.h>
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
#ifndef incl_HPHP_HTTP_SERVER_LIB_EVENT_SERVER_WITH_TAKEOVER_H_
|
||||
#define incl_HPHP_HTTP_SERVER_LIB_EVENT_SERVER_WITH_TAKEOVER_H_
|
||||
|
||||
#include "hphp/runtime/base/server/libevent_server.h"
|
||||
#include "hphp/runtime/server/libevent_server.h"
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
+3
-3
@@ -14,9 +14,9 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/libevent_transport.h"
|
||||
#include "hphp/runtime/base/server/libevent_server.h"
|
||||
#include "hphp/runtime/base/server/server.h"
|
||||
#include "hphp/runtime/server/libevent_transport.h"
|
||||
#include "hphp/runtime/server/libevent_server.h"
|
||||
#include "hphp/runtime/server/server.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/util/util.h"
|
||||
#include "hphp/util/logger.h"
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
#ifndef incl_HPHP_HTTP_SERVER_LIB_EVENT_TRANSPORT_H_
|
||||
#define incl_HPHP_HTTP_SERVER_LIB_EVENT_TRANSPORT_H_
|
||||
|
||||
#include "hphp/runtime/base/server/transport.h"
|
||||
#include "hphp/runtime/server/transport.h"
|
||||
#include <evhttp.h>
|
||||
|
||||
namespace HPHP {
|
||||
+5
-5
@@ -14,11 +14,11 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/pagelet_server.h"
|
||||
#include "hphp/runtime/base/server/transport.h"
|
||||
#include "hphp/runtime/base/server/http_request_handler.h"
|
||||
#include "hphp/runtime/base/server/upload.h"
|
||||
#include "hphp/runtime/base/server/job_queue_vm_stack.h"
|
||||
#include "hphp/runtime/server/pagelet_server.h"
|
||||
#include "hphp/runtime/server/transport.h"
|
||||
#include "hphp/runtime/server/http_request_handler.h"
|
||||
#include "hphp/runtime/server/upload.h"
|
||||
#include "hphp/runtime/server/job_queue_vm_stack.h"
|
||||
#include "hphp/runtime/base/util/string_buffer.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/resource_data.h"
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/replay_transport.h"
|
||||
#include "hphp/runtime/server/replay_transport.h"
|
||||
#include "hphp/runtime/base/string_util.h"
|
||||
#include "hphp/runtime/base/zend/zend_functions.h"
|
||||
#include "hphp/runtime/base/zend/zend_string.h"
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
#ifndef incl_HPHP_REPLAY_TRANSPORT_H_
|
||||
#define incl_HPHP_REPLAY_TRANSPORT_H_
|
||||
|
||||
#include "hphp/runtime/base/server/transport.h"
|
||||
#include "hphp/runtime/server/transport.h"
|
||||
#include "hphp/util/hdf.h"
|
||||
#include "hphp/runtime/base/complex_types.h"
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/request_uri.h"
|
||||
#include "hphp/runtime/base/server/virtual_host.h"
|
||||
#include "hphp/runtime/base/server/transport.h"
|
||||
#include "hphp/runtime/server/request_uri.h"
|
||||
#include "hphp/runtime/server/virtual_host.h"
|
||||
#include "hphp/runtime/server/transport.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/server/static_content_cache.h"
|
||||
#include "hphp/runtime/server/static_content_cache.h"
|
||||
#include "hphp/runtime/base/string_util.h"
|
||||
|
||||
namespace HPHP {
|
||||
+7
-7
@@ -14,16 +14,16 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/rpc_request_handler.h"
|
||||
#include "hphp/runtime/server/rpc_request_handler.h"
|
||||
|
||||
#include "hphp/runtime/base/server/http_request_handler.h"
|
||||
#include "hphp/runtime/server/http_request_handler.h"
|
||||
#include "hphp/runtime/base/program_functions.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/base/server/http_protocol.h"
|
||||
#include "hphp/runtime/base/server/access_log.h"
|
||||
#include "hphp/runtime/base/server/source_root_info.h"
|
||||
#include "hphp/runtime/base/server/request_uri.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/server/http_protocol.h"
|
||||
#include "hphp/runtime/server/access_log.h"
|
||||
#include "hphp/runtime/server/source_root_info.h"
|
||||
#include "hphp/runtime/server/request_uri.h"
|
||||
#include "hphp/runtime/ext/ext_json.h"
|
||||
#include "hphp/util/process.h"
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
#ifndef incl_HPHP_RPC_REQUEST_HANDLER_H_
|
||||
#define incl_HPHP_RPC_REQUEST_HANDLER_H_
|
||||
|
||||
#include "hphp/runtime/base/server/server.h"
|
||||
#include "hphp/runtime/server/server.h"
|
||||
#include "hphp/runtime/base/execution_context.h"
|
||||
|
||||
namespace HPHP {
|
||||
+4
-4
@@ -14,10 +14,10 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/satellite_server.h"
|
||||
#include "hphp/runtime/base/server/http_request_handler.h"
|
||||
#include "hphp/runtime/base/server/rpc_request_handler.h"
|
||||
#include "hphp/runtime/base/server/virtual_host.h"
|
||||
#include "hphp/runtime/server/satellite_server.h"
|
||||
#include "hphp/runtime/server/http_request_handler.h"
|
||||
#include "hphp/runtime/server/rpc_request_handler.h"
|
||||
#include "hphp/runtime/server/virtual_host.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/preg.h"
|
||||
#include "hphp/util/util.h"
|
||||
@@ -14,9 +14,9 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/server.h"
|
||||
#include "hphp/runtime/server/server.h"
|
||||
#include "hphp/runtime/base/complex_types.h"
|
||||
#include "hphp/runtime/base/server/satellite_server.h"
|
||||
#include "hphp/runtime/server/satellite_server.h"
|
||||
#include "hphp/runtime/base/preg.h"
|
||||
#include <signal.h>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#ifndef incl_HPHP_HTTP_SERVER_SERVER_H_
|
||||
#define incl_HPHP_HTTP_SERVER_SERVER_H_
|
||||
|
||||
#include "hphp/runtime/base/server/transport.h"
|
||||
#include "hphp/runtime/server/transport.h"
|
||||
#include "hphp/util/exception.h"
|
||||
#include "hphp/util/lock.h"
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| HipHop for PHP |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/server/server_name_indication.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/util/extended_logger.h"
|
||||
#include "hphp/util/util.h"
|
||||
#include "openssl/ssl.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
namespace HPHP {
|
||||
|
||||
hphp_string_map<SSL_CTX *> ServerNameIndication::sn_ctxd_map;
|
||||
std::string ServerNameIndication::path;
|
||||
struct ssl_config ServerNameIndication::config;
|
||||
|
||||
const std::string ServerNameIndication::crt_ext = ".crt";
|
||||
const std::string ServerNameIndication::key_ext = ".key";
|
||||
|
||||
/**
|
||||
* Given a default SSL config, SSL_CTX, and certificate path, load certs.
|
||||
*/
|
||||
void ServerNameIndication::load(void *ctx, const struct ssl_config &cfg,
|
||||
const std::string &cert_dir) {
|
||||
|
||||
if (!ctx) {
|
||||
return;
|
||||
}
|
||||
|
||||
// We use these later to dynamically load certs, so make copies.
|
||||
path = cert_dir;
|
||||
config = cfg;
|
||||
|
||||
// Ensure path ends with '/'. This helps our pruning later.
|
||||
if (path.size() > 0 && path[path.size() - 1] != '/') {
|
||||
path.append("/");
|
||||
}
|
||||
|
||||
vector<std::string> server_names;
|
||||
find_server_names(path, server_names);
|
||||
|
||||
for (vector<std::string>::iterator it = server_names.begin();
|
||||
it != server_names.end();
|
||||
++it) {
|
||||
loadFromFile(*it);
|
||||
}
|
||||
|
||||
// Register our per-request server name indication callback.
|
||||
// We register our callback even if there's no additional certs so that
|
||||
// a cert added in the future will get picked up without a restart.
|
||||
SSL_CTX_set_tlsext_servername_callback(
|
||||
(SSL_CTX*)ctx,
|
||||
ServerNameIndication::callback);
|
||||
}
|
||||
|
||||
bool ServerNameIndication::loadFromFile(const std::string &server_name) {
|
||||
std::string key_file = path + server_name + key_ext;
|
||||
std::string crt_file = path + server_name + crt_ext;
|
||||
struct ssl_config tmp_config = config;
|
||||
|
||||
if (!fileIsValid(key_file) || !fileIsValid(crt_file)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create an SSL_CTX for this cert pair.
|
||||
tmp_config.cert_file = (char *)(crt_file.c_str());
|
||||
tmp_config.pk_file = (char *)(key_file.c_str());
|
||||
SSL_CTX *tmp_ctx = (SSL_CTX*)evhttp_init_openssl(&tmp_config);
|
||||
if (tmp_ctx) {
|
||||
sn_ctxd_map.insert(make_pair(server_name, tmp_ctx));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ServerNameIndication::fileIsValid(const std::string &filename) {
|
||||
if (filename.empty()) {
|
||||
return false;
|
||||
}
|
||||
int fd = open(filename.c_str(), O_RDONLY);
|
||||
if (fd >= 0) {
|
||||
close(fd);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ServerNameIndication::find_server_names(
|
||||
const std::string &path,
|
||||
vector<std::string> &server_names) {
|
||||
|
||||
hphp_string_map<bool> crt_files;
|
||||
hphp_string_map<bool> key_files;
|
||||
|
||||
// Iterate through all files in the cert directory.
|
||||
vector<std::string> crt_dir_files;
|
||||
Util::find(crt_dir_files, "/", path.c_str(), /* php */ false);
|
||||
for (vector<std::string>::iterator it = crt_dir_files.begin();
|
||||
it != crt_dir_files.end();
|
||||
++it) {
|
||||
|
||||
// Skip default cert and key; we'll fall back to those anyway.
|
||||
size_t filename_len = it->size() - path.size();
|
||||
if (ends_with(*it, crt_ext) && *it != RuntimeOption::SSLCertificateFile) {
|
||||
std::string name = it->substr(path.size(), filename_len - crt_ext.size());
|
||||
crt_files.insert(make_pair(name, true));
|
||||
} else if (ends_with(*it, key_ext) &&
|
||||
*it != RuntimeOption::SSLCertificateKeyFile) {
|
||||
std::string name = it->substr(path.size(), filename_len - key_ext.size());
|
||||
key_files.insert(make_pair(name, true));
|
||||
}
|
||||
}
|
||||
|
||||
// Intersect key_files and crt_files to find valid pairs.
|
||||
for (hphp_string_map<bool>::iterator it = key_files.begin();
|
||||
it != key_files.end();
|
||||
++it) {
|
||||
if (crt_files.find(it->first) == crt_files.end()) {
|
||||
continue;
|
||||
}
|
||||
server_names.push_back(it->first);
|
||||
}
|
||||
}
|
||||
|
||||
bool ServerNameIndication::ends_with(const std::string &s,
|
||||
const std::string &end) {
|
||||
if (s.size() > end.size()) {
|
||||
return std::equal(s.begin() + s.size() - end.size(), s.end(), end.begin());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int ServerNameIndication::callback(void *s, int *ad, void *arg) {
|
||||
SSL *ssl = (SSL *)s;
|
||||
const char *sn_ptr = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
|
||||
if (!sn_ptr) {
|
||||
return SSL_TLSEXT_ERR_OK; // No server name; use the default.
|
||||
}
|
||||
|
||||
// Calculate the names to search for: fqdn and wildcard.
|
||||
std::string fqdn = sn_ptr;
|
||||
size_t pos = fqdn.find('.');
|
||||
std::string wildcard;
|
||||
if (pos != string::npos) {
|
||||
wildcard = fqdn.substr(pos + 1);
|
||||
}
|
||||
|
||||
// Search in memory for matching certificate.
|
||||
if (setCTXFromMemory(ssl, wildcard) || setCTXFromMemory(ssl, fqdn)) {
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
}
|
||||
|
||||
if (setCTXFromFile(ssl, wildcard) || setCTXFromFile(ssl, fqdn)) {
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
}
|
||||
|
||||
// Didn't find a match based on SNI, fallback to default.
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
}
|
||||
|
||||
bool ServerNameIndication::setCTXFromMemory(SSL *ssl, const std::string &name) {
|
||||
if (!ssl || name.empty()) {
|
||||
return false;
|
||||
}
|
||||
hphp_string_map<SSL_CTX *>::iterator it = sn_ctxd_map.find(name);
|
||||
if (it != sn_ctxd_map.end()) {
|
||||
SSL_CTX *ctx = it->second;
|
||||
if (ctx && ctx == SSL_set_SSL_CTX(ssl, ctx)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ServerNameIndication::setCTXFromFile(SSL *ssl, const std::string &name) {
|
||||
return loadFromFile(name) && setCTXFromMemory(ssl, name);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| HipHop for PHP |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef incl_HPHP_SERVER_NAME_INDICATION_H_
|
||||
#define incl_HPHP_SERVER_NAME_INDICATION_H_
|
||||
|
||||
#include "hphp/util/base.h"
|
||||
#include <evhttp.h>
|
||||
#include "openssl/ssl.h"
|
||||
|
||||
namespace HPHP {
|
||||
|
||||
class ServerNameIndication {
|
||||
static hphp_string_map<SSL_CTX *> sn_ctxd_map;
|
||||
static const std::string crt_ext;
|
||||
static const std::string key_ext;
|
||||
static std::string path;
|
||||
static struct ssl_config config;
|
||||
|
||||
public:
|
||||
static void load(void *ctx, const struct ssl_config &config,
|
||||
const std::string &cert_dir);
|
||||
static int callback(void *s, int *ad, void *arg);
|
||||
|
||||
private:
|
||||
static bool setCTXFromMemory(SSL*, const string&);
|
||||
static bool setCTXFromFile(SSL*, const string&);
|
||||
static void find_server_names(const std::string &, vector<std::string> &);
|
||||
static bool ends_with(const std::string &, const std::string &);
|
||||
static bool loadFromFile(const std::string &);
|
||||
static bool fileIsValid(const std::string &);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // incl_HPHP_SERVER_NAME_INDICATION_H_
|
||||
@@ -13,7 +13,7 @@
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
#include "hphp/runtime/base/server/server_note.h"
|
||||
#include "hphp/runtime/server/server_note.h"
|
||||
#include "hphp/runtime/base/util/request_local.h"
|
||||
|
||||
namespace HPHP {
|
||||
@@ -14,8 +14,8 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/base/server/http_server.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/server/http_server.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/program_functions.h"
|
||||
#include "hphp/runtime/base/memory/memory_manager.h"
|
||||
+3
-3
@@ -14,12 +14,12 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/service_thread.h"
|
||||
#include "hphp/runtime/server/service_thread.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/util/thread_local.h"
|
||||
#include "hphp/util/hdf.h"
|
||||
#include "hphp/runtime/base/server/replay_transport.h"
|
||||
#include "hphp/runtime/base/server/http_request_handler.h"
|
||||
#include "hphp/runtime/server/replay_transport.h"
|
||||
#include "hphp/runtime/server/http_request_handler.h"
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
static ServiceThread *GetThisThread();
|
||||
|
||||
public:
|
||||
ServiceThread(const std::string &url, bool loop = false);
|
||||
explicit ServiceThread(const std::string &url, bool loop = false);
|
||||
|
||||
void threadRun();
|
||||
void waitForStarted();
|
||||
+3
-3
@@ -14,11 +14,11 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/source_root_info.h"
|
||||
#include "hphp/runtime/server/source_root_info.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/preg.h"
|
||||
#include "hphp/runtime/base/server/http_request_handler.h"
|
||||
#include "hphp/runtime/base/server/transport.h"
|
||||
#include "hphp/runtime/server/http_request_handler.h"
|
||||
#include "hphp/runtime/server/transport.h"
|
||||
#include "hphp/runtime/debugger/debugger.h"
|
||||
#include "hphp/runtime/base/tv_arith.h"
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/static_content_cache.h"
|
||||
#include "hphp/runtime/server/static_content_cache.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/util/timer.h"
|
||||
#include "hphp/util/logger.h"
|
||||
@@ -14,16 +14,16 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/transport.h"
|
||||
#include "hphp/runtime/base/server/server.h"
|
||||
#include "hphp/runtime/base/server/upload.h"
|
||||
#include "hphp/runtime/base/server/server_stats.h"
|
||||
#include "hphp/runtime/server/transport.h"
|
||||
#include "hphp/runtime/server/server.h"
|
||||
#include "hphp/runtime/server/upload.h"
|
||||
#include "hphp/runtime/server/server_stats.h"
|
||||
#include "hphp/runtime/base/file/file.h"
|
||||
#include "hphp/runtime/base/string_util.h"
|
||||
#include "hphp/runtime/base/time/datetime.h"
|
||||
#include "hphp/runtime/base/zend/zend_url.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/server/access_log.h"
|
||||
#include "hphp/runtime/server/access_log.h"
|
||||
#include "hphp/runtime/ext/ext_openssl.h"
|
||||
#include "hphp/util/compression.h"
|
||||
#include "hphp/util/util.h"
|
||||
@@ -15,7 +15,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/upload.h"
|
||||
#include "hphp/runtime/server/upload.h"
|
||||
#include "hphp/runtime/base/program_functions.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/hphp_system.h"
|
||||
@@ -19,7 +19,7 @@
|
||||
#define incl_HPHP_UPLOAD_H_
|
||||
|
||||
#include <string>
|
||||
#include "hphp/runtime/base/server/transport.h"
|
||||
#include "hphp/runtime/server/transport.h"
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -13,7 +13,7 @@
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
#include "hphp/runtime/base/server/virtual_host.h"
|
||||
#include "hphp/runtime/server/virtual_host.h"
|
||||
|
||||
#include "hphp/runtime/base/comparisons.h"
|
||||
#include "hphp/runtime/base/preg.h"
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "hphp/util/hdf.h"
|
||||
#include "hphp/runtime/base/types.h"
|
||||
#include "hphp/runtime/base/server/ip_block_map.h"
|
||||
#include "hphp/runtime/server/ip_block_map.h"
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/warmup_request_handler.h"
|
||||
#include "hphp/runtime/server/warmup_request_handler.h"
|
||||
|
||||
#include "folly/Memory.h"
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@
|
||||
#ifndef incl_HPHP_WARMUP_REQUEST_HANDLER_H_
|
||||
#define incl_HPHP_WARMUP_REQUEST_HANDLER_H_
|
||||
|
||||
#include "hphp/runtime/base/server/server.h"
|
||||
#include "hphp/runtime/base/server/http_request_handler.h"
|
||||
#include "hphp/runtime/server/server.h"
|
||||
#include "hphp/runtime/server/http_request_handler.h"
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -14,12 +14,12 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "hphp/runtime/base/server/xbox_server.h"
|
||||
#include "hphp/runtime/server/xbox_server.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/server/rpc_request_handler.h"
|
||||
#include "hphp/runtime/base/server/satellite_server.h"
|
||||
#include "hphp/runtime/server/rpc_request_handler.h"
|
||||
#include "hphp/runtime/server/satellite_server.h"
|
||||
#include "hphp/runtime/base/util/libevent_http_client.h"
|
||||
#include "hphp/runtime/base/server/job_queue_vm_stack.h"
|
||||
#include "hphp/runtime/server/job_queue_vm_stack.h"
|
||||
#include "hphp/runtime/ext/ext_json.h"
|
||||
#include "hphp/util/job_queue.h"
|
||||
#include "hphp/util/lock.h"
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "hphp/runtime/base/complex_types.h"
|
||||
#include "hphp/runtime/base/runtime_option.h"
|
||||
#include "hphp/runtime/base/server/satellite_server.h"
|
||||
#include "hphp/runtime/server/satellite_server.h"
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -63,7 +63,7 @@
|
||||
#include "hphp/runtime/ext/ext_array.h"
|
||||
#include "hphp/runtime/base/stats.h"
|
||||
#include "hphp/runtime/vm/type_profile.h"
|
||||
#include "hphp/runtime/base/server/source_root_info.h"
|
||||
#include "hphp/runtime/server/source_root_info.h"
|
||||
#include "hphp/runtime/base/util/extended_logger.h"
|
||||
#include "hphp/runtime/base/memory/tracer.h"
|
||||
|
||||
|
||||
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário