Commit cdb6faf0 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix Server: HTTP and RTSP header syntax

parent affc7db0
......@@ -1273,7 +1273,7 @@ static int RtspCallback( httpd_callback_sys_t *p_args, httpd_client_t *cl,
return VLC_EGENERIC;
}
httpd_MsgAdd( answer, "Server", "VLC Server" );
httpd_MsgAdd( answer, "Server", "VLC/%s", VERSION );
httpd_MsgAdd( answer, "Content-Length", "%d", answer->i_body );
psz_cseq = httpd_MsgGet( query, "Cseq" );
psz_cseq ? i_cseq = atoi( psz_cseq ) : 0;
......@@ -1514,7 +1514,7 @@ static int RtspCallbackES( httpd_callback_sys_t *p_args, httpd_client_t *cl,
break;
}
httpd_MsgAdd( answer, "Server", "VLC Server" );
httpd_MsgAdd( answer, "Server", "VLC/%s", VERSION );
httpd_MsgAdd( answer, "Content-Length", "%d", answer->i_body );
psz_cseq = httpd_MsgGet( query, "Cseq" );
if (psz_cseq)
......
......@@ -398,7 +398,7 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id,
answer->i_body = 0;
answer->p_body = NULL;
httpd_MsgAdd( answer, "Server", "%s", PACKAGE_STRING );
httpd_MsgAdd( answer, "Server", "VLC/%s", VERSION );
/* Date: is always allowed, and sometimes mandatory with RTSP/2.0. */
struct tm ut;
......
......@@ -2144,7 +2144,7 @@ static void* httpd_HostThread( void *data )
answer->i_body = 0;
answer->p_body = NULL;
httpd_MsgAdd( answer, "Server", "%s", PACKAGE_STRING );
httpd_MsgAdd( answer, "Server", "VLC/%s", VERSION );
httpd_MsgAdd( answer, "Content-Length", "0" );
switch( query->i_proto )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment