From f6661989aff30c926831d6b22cdfe4477ac3b616 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 15 Dec 2016 15:00:08 +0800 Subject: [PATCH] fix typo for #513, #691 --- trunk/src/app/srs_app_http_api.cpp | 12 ++++++------ trunk/src/app/srs_app_http_api.hpp | 2 +- trunk/src/protocol/srs_http_stack.cpp | 8 ++++---- trunk/src/protocol/srs_http_stack.hpp | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/trunk/src/app/srs_app_http_api.cpp b/trunk/src/app/srs_app_http_api.cpp index 8b5278b02..8cb5b3fbf 100644 --- a/trunk/src/app/srs_app_http_api.cpp +++ b/trunk/src/app/srs_app_http_api.cpp @@ -1312,7 +1312,7 @@ SrsHttpApi::SrsHttpApi(IConnectionManager* cm, st_netfd_t fd, SrsHttpServeMux* m : SrsConnection(cm, fd, cip) { mux = m; - cros = new SrsHttpCrosMux(); + cors = new SrsHttpCorsMux(); parser = new SrsHttpParser(); _srs_config->subscribe(this); @@ -1321,7 +1321,7 @@ SrsHttpApi::SrsHttpApi(IConnectionManager* cm, st_netfd_t fd, SrsHttpServeMux* m SrsHttpApi::~SrsHttpApi() { srs_freep(parser); - srs_freep(cros); + srs_freep(cors); _srs_config->unsubscribe(this); } @@ -1367,9 +1367,9 @@ int SrsHttpApi::do_cycle() // @see https://github.com/ossrs/srs/issues/398 skt.set_recv_timeout(SRS_HTTP_RECV_TIMEOUT_US); - // initialize the cros, which will proxy to mux. + // initialize the cors, which will proxy to mux. bool crossdomain_enabled = _srs_config->get_http_api_crossdomain(); - if ((ret = cros->initialize(mux, crossdomain_enabled)) != ERROR_SUCCESS) { + if ((ret = cors->initialize(mux, crossdomain_enabled)) != ERROR_SUCCESS) { return ret; } @@ -1425,7 +1425,7 @@ int SrsHttpApi::process_request(ISrsHttpResponseWriter* w, ISrsHttpMessage* r) hm->is_chunked(), hm->is_infinite_chunked()); // use default server mux to serve http request. - if ((ret = cros->serve_http(w, r)) != ERROR_SUCCESS) { + if ((ret = cors->serve_http(w, r)) != ERROR_SUCCESS) { if (!srs_is_client_gracefully_close(ret)) { srs_error("serve http msg failed. ret=%d", ret); } @@ -1440,7 +1440,7 @@ int SrsHttpApi::on_reload_http_api_crossdomain() int ret = ERROR_SUCCESS; bool crossdomain_enabled = _srs_config->get_http_api_crossdomain(); - if ((ret = cros->initialize(mux, crossdomain_enabled)) != ERROR_SUCCESS) { + if ((ret = cors->initialize(mux, crossdomain_enabled)) != ERROR_SUCCESS) { return ret; } diff --git a/trunk/src/app/srs_app_http_api.hpp b/trunk/src/app/srs_app_http_api.hpp index 0a4f71756..1f10de036 100644 --- a/trunk/src/app/srs_app_http_api.hpp +++ b/trunk/src/app/srs_app_http_api.hpp @@ -211,7 +211,7 @@ class SrsHttpApi : virtual public SrsConnection, virtual public ISrsReloadHandle { private: SrsHttpParser* parser; - SrsHttpCrosMux* cros; + SrsHttpCorsMux* cors; SrsHttpServeMux* mux; public: SrsHttpApi(IConnectionManager* cm, st_netfd_t fd, SrsHttpServeMux* m, std::string cip); diff --git a/trunk/src/protocol/srs_http_stack.cpp b/trunk/src/protocol/srs_http_stack.cpp index 035c17e15..3b23e0298 100644 --- a/trunk/src/protocol/srs_http_stack.cpp +++ b/trunk/src/protocol/srs_http_stack.cpp @@ -761,18 +761,18 @@ bool SrsHttpServeMux::path_match(string pattern, string path) return false; } -SrsHttpCrosMux::SrsHttpCrosMux() +SrsHttpCorsMux::SrsHttpCorsMux() { next = NULL; enabled = false; required = false; } -SrsHttpCrosMux::~SrsHttpCrosMux() +SrsHttpCorsMux::~SrsHttpCorsMux() { } -int SrsHttpCrosMux::initialize(ISrsHttpServeMux* worker, bool cros_enabled) +int SrsHttpCorsMux::initialize(ISrsHttpServeMux* worker, bool cros_enabled) { next = worker; enabled = cros_enabled; @@ -780,7 +780,7 @@ int SrsHttpCrosMux::initialize(ISrsHttpServeMux* worker, bool cros_enabled) return ERROR_SUCCESS; } -int SrsHttpCrosMux::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r) +int SrsHttpCorsMux::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r) { // method is OPTIONS and enable crossdomain, required crossdomain header. if (r->is_http_options() && enabled) { diff --git a/trunk/src/protocol/srs_http_stack.hpp b/trunk/src/protocol/srs_http_stack.hpp index d3a1d980c..088262395 100644 --- a/trunk/src/protocol/srs_http_stack.hpp +++ b/trunk/src/protocol/srs_http_stack.hpp @@ -443,18 +443,18 @@ private: }; /** - * The filter http mux, directly serve the http CROS requests, + * The filter http mux, directly serve the http CORS requests, * while proxy to the worker mux for services. */ -class SrsHttpCrosMux : public ISrsHttpServeMux +class SrsHttpCorsMux : public ISrsHttpServeMux { private: bool required; bool enabled; ISrsHttpServeMux* next; public: - SrsHttpCrosMux(); - virtual ~SrsHttpCrosMux(); + SrsHttpCorsMux(); + virtual ~SrsHttpCorsMux(); public: virtual int initialize(ISrsHttpServeMux* worker, bool cros_enabled); // interface ISrsHttpServeMux