winlin

refine code, extract the http protocol sdk to module.

@@ -159,7 +159,7 @@ MODULE_DEPENDS=("CORE" "KERNEL") @@ -159,7 +159,7 @@ MODULE_DEPENDS=("CORE" "KERNEL")
159 ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSSLRoot}) 159 ModuleLibIncs=(${SRS_OBJS_DIR} ${LibSSLRoot})
160 MODULE_FILES=("srs_rtmp_amf0" "srs_rtmp_io" "srs_rtmp_stack" "srs_rtmp_sdk" 160 MODULE_FILES=("srs_rtmp_amf0" "srs_rtmp_io" "srs_rtmp_stack" "srs_rtmp_sdk"
161 "srs_rtmp_handshake" "srs_rtmp_utility" "srs_rtmp_msg_array" "srs_rtmp_buffer" 161 "srs_rtmp_handshake" "srs_rtmp_utility" "srs_rtmp_msg_array" "srs_rtmp_buffer"
162 - "srs_raw_avc" "srs_rtsp_stack") 162 + "srs_raw_avc" "srs_rtsp_stack" "srs_http_stack")
163 RTMP_INCS="src/protocol"; MODULE_DIR=${RTMP_INCS} . auto/modules.sh 163 RTMP_INCS="src/protocol"; MODULE_DIR=${RTMP_INCS} . auto/modules.sh
164 RTMP_OBJS="${MODULE_OBJS[@]}" 164 RTMP_OBJS="${MODULE_OBJS[@]}"
165 # 165 #
@@ -46,6 +46,8 @@ file @@ -46,6 +46,8 @@ file
46 ../../src/kernel/srs_kernel_utility.hpp, 46 ../../src/kernel/srs_kernel_utility.hpp,
47 ../../src/kernel/srs_kernel_utility.cpp, 47 ../../src/kernel/srs_kernel_utility.cpp,
48 protocol readonly separator, 48 protocol readonly separator,
  49 + ../../src/protocol/srs_http_stack.hpp,
  50 + ../../src/protocol/srs_http_stack.cpp,
49 ../../src/protocol/srs_raw_avc.hpp, 51 ../../src/protocol/srs_raw_avc.hpp,
50 ../../src/protocol/srs_raw_avc.cpp, 52 ../../src/protocol/srs_raw_avc.cpp,
51 ../../src/protocol/srs_rtmp_amf0.hpp, 53 ../../src/protocol/srs_rtmp_amf0.hpp,
@@ -119,6 +119,7 @@ @@ -119,6 +119,7 @@
119 <ClInclude Include="..\..\src\libs\srs_librtmp.hpp" /> 119 <ClInclude Include="..\..\src\libs\srs_librtmp.hpp" />
120 <ClInclude Include="..\..\src\libs\srs_lib_bandwidth.hpp" /> 120 <ClInclude Include="..\..\src\libs\srs_lib_bandwidth.hpp" />
121 <ClInclude Include="..\..\src\libs\srs_lib_simple_socket.hpp" /> 121 <ClInclude Include="..\..\src\libs\srs_lib_simple_socket.hpp" />
  122 + <ClInclude Include="..\..\src\protocol\srs_http_stack.hpp" />
122 <ClInclude Include="..\..\src\protocol\srs_raw_avc.hpp" /> 123 <ClInclude Include="..\..\src\protocol\srs_raw_avc.hpp" />
123 <ClInclude Include="..\..\src\protocol\srs_rtmp_amf0.hpp" /> 124 <ClInclude Include="..\..\src\protocol\srs_rtmp_amf0.hpp" />
124 <ClInclude Include="..\..\src\protocol\srs_rtmp_buffer.hpp" /> 125 <ClInclude Include="..\..\src\protocol\srs_rtmp_buffer.hpp" />
@@ -201,6 +202,7 @@ @@ -201,6 +202,7 @@
201 <ClCompile Include="..\..\src\libs\srs_lib_bandwidth.cpp" /> 202 <ClCompile Include="..\..\src\libs\srs_lib_bandwidth.cpp" />
202 <ClCompile Include="..\..\src\libs\srs_lib_simple_socket.cpp" /> 203 <ClCompile Include="..\..\src\libs\srs_lib_simple_socket.cpp" />
203 <ClCompile Include="..\..\src\main\srs_main_server.cpp" /> 204 <ClCompile Include="..\..\src\main\srs_main_server.cpp" />
  205 + <ClCompile Include="..\..\src\protocol\srs_http_stack.cpp" />
204 <ClCompile Include="..\..\src\protocol\srs_raw_avc.cpp" /> 206 <ClCompile Include="..\..\src\protocol\srs_raw_avc.cpp" />
205 <ClCompile Include="..\..\src\protocol\srs_rtmp_amf0.cpp" /> 207 <ClCompile Include="..\..\src\protocol\srs_rtmp_amf0.cpp" />
206 <ClCompile Include="..\..\src\protocol\srs_rtmp_buffer.cpp" /> 208 <ClCompile Include="..\..\src\protocol\srs_rtmp_buffer.cpp" />
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
  10 + 3C0E1B8D1B0F5ADF003ADEF7 /* srs_http_stack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C0E1B8B1B0F5ADF003ADEF7 /* srs_http_stack.cpp */; };
10 3C1231F61AAE652D00CE8F6C /* srs_core_autofree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1231F01AAE652C00CE8F6C /* srs_core_autofree.cpp */; }; 11 3C1231F61AAE652D00CE8F6C /* srs_core_autofree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1231F01AAE652C00CE8F6C /* srs_core_autofree.cpp */; };
11 3C1231F71AAE652D00CE8F6C /* srs_core_performance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1231F21AAE652C00CE8F6C /* srs_core_performance.cpp */; }; 12 3C1231F71AAE652D00CE8F6C /* srs_core_performance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1231F21AAE652C00CE8F6C /* srs_core_performance.cpp */; };
12 3C1231F81AAE652D00CE8F6C /* srs_core.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1231F41AAE652D00CE8F6C /* srs_core.cpp */; }; 13 3C1231F81AAE652D00CE8F6C /* srs_core.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1231F41AAE652D00CE8F6C /* srs_core.cpp */; };
@@ -122,6 +123,8 @@ @@ -122,6 +123,8 @@
122 /* End PBXCopyFilesBuildPhase section */ 123 /* End PBXCopyFilesBuildPhase section */
123 124
124 /* Begin PBXFileReference section */ 125 /* Begin PBXFileReference section */
  126 + 3C0E1B8B1B0F5ADF003ADEF7 /* srs_http_stack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_http_stack.cpp; path = ../../../src/protocol/srs_http_stack.cpp; sourceTree = "<group>"; };
  127 + 3C0E1B8C1B0F5ADF003ADEF7 /* srs_http_stack.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_http_stack.hpp; path = ../../../src/protocol/srs_http_stack.hpp; sourceTree = "<group>"; };
125 3C1231E51AAE64A400CE8F6C /* srs_xcode */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = srs_xcode; sourceTree = BUILT_PRODUCTS_DIR; }; 128 3C1231E51AAE64A400CE8F6C /* srs_xcode */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = srs_xcode; sourceTree = BUILT_PRODUCTS_DIR; };
126 3C1231F01AAE652C00CE8F6C /* srs_core_autofree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_core_autofree.cpp; path = ../../../src/core/srs_core_autofree.cpp; sourceTree = "<group>"; }; 129 3C1231F01AAE652C00CE8F6C /* srs_core_autofree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_core_autofree.cpp; path = ../../../src/core/srs_core_autofree.cpp; sourceTree = "<group>"; };
127 3C1231F11AAE652C00CE8F6C /* srs_core_autofree.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_core_autofree.hpp; path = ../../../src/core/srs_core_autofree.hpp; sourceTree = "<group>"; }; 130 3C1231F11AAE652C00CE8F6C /* srs_core_autofree.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_core_autofree.hpp; path = ../../../src/core/srs_core_autofree.hpp; sourceTree = "<group>"; };
@@ -487,6 +490,8 @@ @@ -487,6 +490,8 @@
487 3C12322C1AAE819900CE8F6C /* protocol */ = { 490 3C12322C1AAE819900CE8F6C /* protocol */ = {
488 isa = PBXGroup; 491 isa = PBXGroup;
489 children = ( 492 children = (
  493 + 3C0E1B8B1B0F5ADF003ADEF7 /* srs_http_stack.cpp */,
  494 + 3C0E1B8C1B0F5ADF003ADEF7 /* srs_http_stack.hpp */,
490 3C12322D1AAE81A400CE8F6C /* srs_raw_avc.cpp */, 495 3C12322D1AAE81A400CE8F6C /* srs_raw_avc.cpp */,
491 3C12322E1AAE81A400CE8F6C /* srs_raw_avc.hpp */, 496 3C12322E1AAE81A400CE8F6C /* srs_raw_avc.hpp */,
492 3C12322F1AAE81A400CE8F6C /* srs_rtmp_amf0.cpp */, 497 3C12322F1AAE81A400CE8F6C /* srs_rtmp_amf0.cpp */,
@@ -886,6 +891,7 @@ @@ -886,6 +891,7 @@
886 3C1232411AAE81A400CE8F6C /* srs_raw_avc.cpp in Sources */, 891 3C1232411AAE81A400CE8F6C /* srs_raw_avc.cpp in Sources */,
887 3C1232491AAE81A400CE8F6C /* srs_rtmp_utility.cpp in Sources */, 892 3C1232491AAE81A400CE8F6C /* srs_rtmp_utility.cpp in Sources */,
888 3C663F191AB0155100286D8B /* srs_publish.c in Sources */, 893 3C663F191AB0155100286D8B /* srs_publish.c in Sources */,
  894 + 3C0E1B8D1B0F5ADF003ADEF7 /* srs_http_stack.cpp in Sources */,
889 3C1232A01AAE81D900CE8F6C /* srs_app_http_client.cpp in Sources */, 895 3C1232A01AAE81D900CE8F6C /* srs_app_http_client.cpp in Sources */,
890 3C689F981AB6AAAC00C9CEEE /* key.c in Sources */, 896 3C689F981AB6AAAC00C9CEEE /* key.c in Sources */,
891 3C12329B1AAE81D900CE8F6C /* srs_app_ffmpeg.cpp in Sources */, 897 3C12329B1AAE81D900CE8F6C /* srs_app_ffmpeg.cpp in Sources */,
@@ -58,7 +58,7 @@ using namespace std; @@ -58,7 +58,7 @@ using namespace std;
58 58
59 #define SRS_HTTP_DEFAULT_PAGE "index.html" 59 #define SRS_HTTP_DEFAULT_PAGE "index.html"
60 60
61 -int srs_go_http_response_json(ISrsHttpResponseWriter* w, string data) 61 +int srs_http_response_json(ISrsHttpResponseWriter* w, string data)
62 { 62 {
63 w->header()->set_content_length(data.length()); 63 w->header()->set_content_length(data.length());
64 w->header()->set_content_type("application/json"); 64 w->header()->set_content_type("application/json");
@@ -40,6 +40,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -40,6 +40,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40 40
41 #include <srs_app_st.hpp> 41 #include <srs_app_st.hpp>
42 #include <srs_kernel_consts.hpp> 42 #include <srs_kernel_consts.hpp>
  43 +#include <srs_http_stack.hpp>
43 44
44 class SrsRequest; 45 class SrsRequest;
45 class SrsStSocket; 46 class SrsStSocket;
@@ -72,7 +73,7 @@ class SrsConnection; @@ -72,7 +73,7 @@ class SrsConnection;
72 #define SRS_HTTP_TS_SEND_BUFFER_SIZE 4096 73 #define SRS_HTTP_TS_SEND_BUFFER_SIZE 4096
73 74
74 // helper function: response in json format. 75 // helper function: response in json format.
75 -extern int srs_go_http_response_json(ISrsHttpResponseWriter* w, std::string data); 76 +extern int srs_http_response_json(ISrsHttpResponseWriter* w, std::string data);
76 77
77 // state of message 78 // state of message
78 enum SrsHttpParseState { 79 enum SrsHttpParseState {
@@ -59,7 +59,7 @@ int SrsGoApiRoot::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r) @@ -59,7 +59,7 @@ int SrsGoApiRoot::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
59 << SRS_JOBJECT_END 59 << SRS_JOBJECT_END
60 << SRS_JOBJECT_END; 60 << SRS_JOBJECT_END;
61 61
62 - return srs_go_http_response_json(w, ss.str()); 62 + return srs_http_response_json(w, ss.str());
63 } 63 }
64 64
65 SrsGoApiApi::SrsGoApiApi() 65 SrsGoApiApi::SrsGoApiApi()
@@ -81,7 +81,7 @@ int SrsGoApiApi::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r) @@ -81,7 +81,7 @@ int SrsGoApiApi::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
81 << SRS_JOBJECT_END 81 << SRS_JOBJECT_END
82 << SRS_JOBJECT_END; 82 << SRS_JOBJECT_END;
83 83
84 - return srs_go_http_response_json(w, ss.str()); 84 + return srs_http_response_json(w, ss.str());
85 } 85 }
86 86
87 SrsGoApiV1::SrsGoApiV1() 87 SrsGoApiV1::SrsGoApiV1()
@@ -112,7 +112,7 @@ int SrsGoApiV1::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r) @@ -112,7 +112,7 @@ int SrsGoApiV1::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
112 << SRS_JOBJECT_END 112 << SRS_JOBJECT_END
113 << SRS_JOBJECT_END; 113 << SRS_JOBJECT_END;
114 114
115 - return srs_go_http_response_json(w, ss.str()); 115 + return srs_http_response_json(w, ss.str());
116 } 116 }
117 117
118 SrsGoApiVersion::SrsGoApiVersion() 118 SrsGoApiVersion::SrsGoApiVersion()
@@ -137,7 +137,7 @@ int SrsGoApiVersion::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r) @@ -137,7 +137,7 @@ int SrsGoApiVersion::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
137 << SRS_JOBJECT_END 137 << SRS_JOBJECT_END
138 << SRS_JOBJECT_END; 138 << SRS_JOBJECT_END;
139 139
140 - return srs_go_http_response_json(w, ss.str()); 140 + return srs_http_response_json(w, ss.str());
141 } 141 }
142 142
143 SrsGoApiSummaries::SrsGoApiSummaries() 143 SrsGoApiSummaries::SrsGoApiSummaries()
@@ -152,7 +152,7 @@ int SrsGoApiSummaries::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r) @@ -152,7 +152,7 @@ int SrsGoApiSummaries::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
152 { 152 {
153 std::stringstream ss; 153 std::stringstream ss;
154 srs_api_dump_summaries(ss); 154 srs_api_dump_summaries(ss);
155 - return srs_go_http_response_json(w, ss.str()); 155 + return srs_http_response_json(w, ss.str());
156 } 156 }
157 157
158 SrsGoApiRusages::SrsGoApiRusages() 158 SrsGoApiRusages::SrsGoApiRusages()
@@ -193,7 +193,7 @@ int SrsGoApiRusages::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* req) @@ -193,7 +193,7 @@ int SrsGoApiRusages::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* req)
193 << SRS_JOBJECT_END 193 << SRS_JOBJECT_END
194 << SRS_JOBJECT_END; 194 << SRS_JOBJECT_END;
195 195
196 - return srs_go_http_response_json(w, ss.str()); 196 + return srs_http_response_json(w, ss.str());
197 } 197 }
198 198
199 SrsGoApiSelfProcStats::SrsGoApiSelfProcStats() 199 SrsGoApiSelfProcStats::SrsGoApiSelfProcStats()
@@ -263,7 +263,7 @@ int SrsGoApiSelfProcStats::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* @@ -263,7 +263,7 @@ int SrsGoApiSelfProcStats::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage*
263 << SRS_JOBJECT_END 263 << SRS_JOBJECT_END
264 << SRS_JOBJECT_END; 264 << SRS_JOBJECT_END;
265 265
266 - return srs_go_http_response_json(w, ss.str()); 266 + return srs_http_response_json(w, ss.str());
267 } 267 }
268 268
269 SrsGoApiSystemProcStats::SrsGoApiSystemProcStats() 269 SrsGoApiSystemProcStats::SrsGoApiSystemProcStats()
@@ -298,7 +298,7 @@ int SrsGoApiSystemProcStats::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessag @@ -298,7 +298,7 @@ int SrsGoApiSystemProcStats::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessag
298 << SRS_JOBJECT_END 298 << SRS_JOBJECT_END
299 << SRS_JOBJECT_END; 299 << SRS_JOBJECT_END;
300 300
301 - return srs_go_http_response_json(w, ss.str()); 301 + return srs_http_response_json(w, ss.str());
302 } 302 }
303 303
304 SrsGoApiMemInfos::SrsGoApiMemInfos() 304 SrsGoApiMemInfos::SrsGoApiMemInfos()
@@ -334,7 +334,7 @@ int SrsGoApiMemInfos::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r) @@ -334,7 +334,7 @@ int SrsGoApiMemInfos::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
334 << SRS_JOBJECT_END 334 << SRS_JOBJECT_END
335 << SRS_JOBJECT_END; 335 << SRS_JOBJECT_END;
336 336
337 - return srs_go_http_response_json(w, ss.str()); 337 + return srs_http_response_json(w, ss.str());
338 } 338 }
339 339
340 SrsGoApiAuthors::SrsGoApiAuthors() 340 SrsGoApiAuthors::SrsGoApiAuthors()
@@ -359,7 +359,7 @@ int SrsGoApiAuthors::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r) @@ -359,7 +359,7 @@ int SrsGoApiAuthors::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
359 << SRS_JOBJECT_END 359 << SRS_JOBJECT_END
360 << SRS_JOBJECT_END; 360 << SRS_JOBJECT_END;
361 361
362 - return srs_go_http_response_json(w, ss.str()); 362 + return srs_http_response_json(w, ss.str());
363 } 363 }
364 364
365 SrsGoApiRequests::SrsGoApiRequests() 365 SrsGoApiRequests::SrsGoApiRequests()
@@ -420,7 +420,7 @@ int SrsGoApiRequests::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r) @@ -420,7 +420,7 @@ int SrsGoApiRequests::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
420 << SRS_JOBJECT_END 420 << SRS_JOBJECT_END
421 << SRS_JOBJECT_END; 421 << SRS_JOBJECT_END;
422 422
423 - return srs_go_http_response_json(w, ss.str()); 423 + return srs_http_response_json(w, ss.str());
424 } 424 }
425 425
426 SrsGoApiVhosts::SrsGoApiVhosts() 426 SrsGoApiVhosts::SrsGoApiVhosts()
@@ -445,7 +445,7 @@ int SrsGoApiVhosts::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r) @@ -445,7 +445,7 @@ int SrsGoApiVhosts::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
445 << SRS_JFIELD_ORG("vhosts", data.str()) 445 << SRS_JFIELD_ORG("vhosts", data.str())
446 << SRS_JOBJECT_END; 446 << SRS_JOBJECT_END;
447 447
448 - return srs_go_http_response_json(w, ss.str()); 448 + return srs_http_response_json(w, ss.str());
449 } 449 }
450 450
451 SrsGoApiStreams::SrsGoApiStreams() 451 SrsGoApiStreams::SrsGoApiStreams()
@@ -470,7 +470,7 @@ int SrsGoApiStreams::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r) @@ -470,7 +470,7 @@ int SrsGoApiStreams::serve_http(ISrsHttpResponseWriter* w, SrsHttpMessage* r)
470 << SRS_JFIELD_ORG("streams", data.str()) 470 << SRS_JFIELD_ORG("streams", data.str())
471 << SRS_JOBJECT_END; 471 << SRS_JOBJECT_END;
472 472
473 - return srs_go_http_response_json(w, ss.str()); 473 + return srs_http_response_json(w, ss.str());
474 } 474 }
475 475
476 SrsHttpApi::SrsHttpApi(IConnectionManager* cm, st_netfd_t fd, SrsHttpServeMux* m) 476 SrsHttpApi::SrsHttpApi(IConnectionManager* cm, st_netfd_t fd, SrsHttpServeMux* m)
  1 +/*
  2 + The MIT License (MIT)
  3 +
  4 + Copyright (c) 2013-2015 SRS(simple-rtmp-server)
  5 +
  6 + Permission is hereby granted, free of charge, to any person obtaining a copy of
  7 + this software and associated documentation files (the "Software"), to deal in
  8 + the Software without restriction, including without limitation the rights to
  9 + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  10 + the Software, and to permit persons to whom the Software is furnished to do so,
  11 + subject to the following conditions:
  12 +
  13 + The above copyright notice and this permission notice shall be included in all
  14 + copies or substantial portions of the Software.
  15 +
  16 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17 + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  18 + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  19 + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  20 + IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  21 + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22 + */
  23 +
  24 +#include <srs_http_stack.hpp>
  1 +/*
  2 + The MIT License (MIT)
  3 +
  4 + Copyright (c) 2013-2015 SRS(simple-rtmp-server)
  5 +
  6 + Permission is hereby granted, free of charge, to any person obtaining a copy of
  7 + this software and associated documentation files (the "Software"), to deal in
  8 + the Software without restriction, including without limitation the rights to
  9 + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  10 + the Software, and to permit persons to whom the Software is furnished to do so,
  11 + subject to the following conditions:
  12 +
  13 + The above copyright notice and this permission notice shall be included in all
  14 + copies or substantial portions of the Software.
  15 +
  16 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17 + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  18 + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  19 + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  20 + IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  21 + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22 + */
  23 +
  24 +#ifndef SRS_PROTOCOL_HTTP_HPP
  25 +#define SRS_PROTOCOL_HTTP_HPP
  26 +
  27 +/*
  28 + #include <srs_http_stack.hpp>
  29 + */
  30 +#include <srs_core.hpp>
  31 +
  32 +#endif