mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix bug of no http-server feature
This commit is contained in:
parent
d28458d5fa
commit
52263457bf
5 changed files with 19 additions and 0 deletions
|
@ -34,6 +34,7 @@ SRS_ARM_UBUNTU12=RESERVED # armhf(v7cpu) built on ubuntu12
|
|||
SRS_PREFIX=/usr/local/srs
|
||||
SRS_JOBS=1
|
||||
SRS_STATIC=RESERVED
|
||||
SRS_HTTP_PARSER=NO
|
||||
# private internal
|
||||
# dev, open all features for dev, no gperf/prof/arm.
|
||||
SRS_DEV=NO
|
||||
|
|
|
@ -31,6 +31,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#include <srs_app_st.hpp>
|
||||
|
||||
#ifdef SRS_HTTP_PARSER
|
||||
|
||||
// http specification
|
||||
namespace srs
|
||||
{
|
||||
|
@ -50,6 +52,8 @@ namespace srs
|
|||
#define __CRLFCRLF "\r\n\r\n" // 0x0D0A0D0A
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef SRS_HTTP_CALLBACK
|
||||
|
||||
class SrsRequest;
|
||||
|
|
|
@ -23,6 +23,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#include <srs_app_http_conn.hpp>
|
||||
|
||||
#ifdef SRS_HTTP_SERVER
|
||||
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
|
@ -254,3 +256,5 @@ int SrsHttpConn::on_body(http_parser* parser, const char* at, size_t length)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -30,6 +30,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#include <srs_core.hpp>
|
||||
|
||||
#ifdef SRS_HTTP_SERVER
|
||||
|
||||
#include <srs_app_st.hpp>
|
||||
#include <srs_app_conn.hpp>
|
||||
|
||||
|
@ -82,3 +84,5 @@ private:
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -440,7 +440,13 @@ int SrsServer::accept_client(SrsListenerType type, st_netfd_t client_stfd)
|
|||
} else if (type == SrsListenerHttpApi) {
|
||||
conn = new SrsHttpApi(this, client_stfd);
|
||||
} else if (type == SrsListenerHttpStream) {
|
||||
#ifdef SRS_HTTP_SERVER
|
||||
conn = new SrsHttpConn(this, client_stfd);
|
||||
#else
|
||||
srs_warn("close http client for server not support http-server");
|
||||
srs_close_stfd(client_stfd);
|
||||
return ret;
|
||||
#endif
|
||||
} else {
|
||||
// TODO: FIXME: handler others
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue