diff options
author | phintuka <phintuka> | 2007-01-07 09:44:53 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2007-01-07 09:44:53 +0000 |
commit | 1b033c7e9376fc2e9244f31fa1a1aee827ebe185 (patch) | |
tree | e147ea4bfbeba2701e7238d0baec92d3d84d0378 | |
parent | 9e42d73ce8ef8cbd4d8fe1e351d89d617c6049c1 (diff) | |
download | xineliboutput-1b033c7e9376fc2e9244f31fa1a1aee827ebe185.tar.gz xineliboutput-1b033c7e9376fc2e9244f31fa1a1aee827ebe185.tar.bz2 |
Use HTTP reply 404 instead of 401
Pass whole request to http streamer (Range: and Connection: headers are used there)
-rw-r--r-- | frontend_svr.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/frontend_svr.c b/frontend_svr.c index 6e7bb121..7ad90c0f 100644 --- a/frontend_svr.c +++ b/frontend_svr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_svr.c,v 1.34 2007-01-07 06:20:35 phintuka Exp $ + * $Id: frontend_svr.c,v 1.35 2007-01-07 09:44:53 phintuka Exp $ * */ @@ -1223,14 +1223,15 @@ void cXinelibServer::Handle_Control_HTTP(int cli, const char *arg) if( m_FileName && m_bPlayingFile) { LOGMSG("HTTP streaming media file"); - new cHttpStreamer(fd_control[cli], m_FileName, - m_State[cli]->Header("Range")->Value()); + new cHttpStreamer(fd_control[cli], m_FileName, m_State[cli]); + // detach socket + m_State[cli] = NULL; fd_control[cli] = -1; CloseConnection(cli); return; } - else + else LOGDBG("No currently playing file"); } @@ -1238,8 +1239,8 @@ void cXinelibServer::Handle_Control_HTTP(int cli, const char *arg) // nothing else will be served ... // LOGMSG("Rejected HTTP request for \'%s\'", *m_State[cli]->Uri()); - write_cmd(fd_control[cli], HTTP_REPLY_401); - LOGDBG("HTTP Reply: HTTP/1.1 401 Unauthorized"); + write_cmd(fd_control[cli], HTTP_REPLY_404); + LOGDBG("HTTP Reply: HTTP/1.1 404 Not Found"); CloseConnection(cli); } } |