From cdb6faf0d09605a6af1216b4f75872ca3de8dcdc Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sat, 29 May 2010 19:15:03 +0300 Subject: [PATCH] Fix Server: HTTP and RTSP header syntax --- modules/misc/rtsp.c | 4 ++-- modules/stream_out/rtsp.c | 2 +- src/network/httpd.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/misc/rtsp.c b/modules/misc/rtsp.c index b02756c6c5..9a60a716bf 100644 --- a/modules/misc/rtsp.c +++ b/modules/misc/rtsp.c @@ -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) diff --git a/modules/stream_out/rtsp.c b/modules/stream_out/rtsp.c index e237c03864..a1cc953170 100644 --- a/modules/stream_out/rtsp.c +++ b/modules/stream_out/rtsp.c @@ -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; diff --git a/src/network/httpd.c b/src/network/httpd.c index 271ee0486e..2e95eedc38 100644 --- a/src/network/httpd.c +++ b/src/network/httpd.c @@ -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 ) -- 2.39.2