winlin

fix bug of no http-server feature

... ... @@ -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
}
... ...