mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-23 09:22:21 +08:00
@@ -133,16 +133,16 @@ onceToken token([](){
|
||||
#endif
|
||||
|
||||
mINI::Instance()[kRootPath] = "./www";
|
||||
mINI::Instance()[kNotFound] =
|
||||
"<html>"
|
||||
"<head><title>404 Not Found</title></head>"
|
||||
"<body bgcolor=\"white\">"
|
||||
"<center><h1>您访问的资源不存在!</h1></center>"
|
||||
"<hr><center>"
|
||||
SERVER_NAME
|
||||
"</center>"
|
||||
"</body>"
|
||||
"</html>";
|
||||
mINI::Instance()[kNotFound] = StrPrinter << "<html>"
|
||||
"<head><title>404 Not Found</title></head>"
|
||||
"<body bgcolor=\"white\">"
|
||||
"<center><h1>您访问的资源不存在!</h1></center>"
|
||||
"<hr><center>"
|
||||
<< SERVER_NAME
|
||||
<< "</center>"
|
||||
"</body>"
|
||||
"</html>"
|
||||
<< endl;
|
||||
},nullptr);
|
||||
|
||||
}//namespace Http
|
||||
|
||||
23
src/Common/macros.cpp
Normal file
23
src/Common/macros.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
|
||||
*
|
||||
* This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit).
|
||||
*
|
||||
* Use of this source code is governed by MIT license that can be found in the
|
||||
* LICENSE file in the root of the source tree. All contributing project authors
|
||||
* may be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "macros.h"
|
||||
|
||||
#if defined(ENABLE_VERSION)
|
||||
#include "Version.h"
|
||||
#endif
|
||||
|
||||
//请遵循MIT协议,勿修改服务器声明
|
||||
#if !defined(ENABLE_VERSION)
|
||||
const char SERVER_NAME[] = "ZLMediaKit-6.0(build in " __DATE__ " " __TIME__ ")";
|
||||
#else
|
||||
const char SERVER_NAME[] = "ZLMediaKit(git hash:" COMMIT_HASH ",branch:" BRANCH_NAME ",build time:" __DATE__ " " __TIME__ ")";
|
||||
#endif
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
#ifndef ZLMEDIAKIT_MACROS_H
|
||||
#define ZLMEDIAKIT_MACROS_H
|
||||
|
||||
#if defined(ENABLE_VERSION)
|
||||
#include "Version.h"
|
||||
#endif
|
||||
|
||||
#if defined(__MACH__)
|
||||
#include <arpa/inet.h>
|
||||
#include <machine/endian.h>
|
||||
@@ -57,13 +53,6 @@
|
||||
#define CLEAR_ARR(arr) for(auto &item : arr){ item = 0;}
|
||||
#endif //CLEAR_ARR
|
||||
|
||||
//请遵循MIT协议,勿修改服务器声明
|
||||
#if !defined(ENABLE_VERSION)
|
||||
#define SERVER_NAME "ZLMediaKit-6.0(build in " __DATE__ " " __TIME__ ")"
|
||||
#else
|
||||
#define SERVER_NAME "ZLMediaKit(git hash:" COMMIT_HASH ",branch:" BRANCH_TIME ",build time:" __DATE__ " " __TIME__ ")"
|
||||
#endif
|
||||
|
||||
#define VHOST_KEY "vhost"
|
||||
#define HTTP_SCHEMA "http"
|
||||
#define RTSP_SCHEMA "rtsp"
|
||||
@@ -73,6 +62,8 @@
|
||||
#define FMP4_SCHEMA "fmp4"
|
||||
#define DEFAULT_VHOST "__defaultVhost__"
|
||||
|
||||
extern const char SERVER_NAME[];
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user