Commit bba2eae5 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Remove oldhttp

Sure, this will be unpopular, and this will likely kill you kittens, but
maintaining 2 http interface is stupid and counter-productive.
Let's hope luahttp will finally get fixed.
parent 7cfe1ace
......@@ -503,27 +503,6 @@ VLC-release.app: vlc
$(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/requests/`basename $${i}` ; \
done
$(INSTALL) -m 644 $(srcdir)/share/lua/http/requests/README.txt $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/http/requests/README.txt
$(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/dialogs
$(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/js
$(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/images
$(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/requests
$(INSTALL) -m 644 $(srcdir)/share/http/.hosts $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/.hosts
for i in $(srcdir)/share/http/*.* ; do \
$(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/`basename $${i}` ; \
done
for i in $(srcdir)/share/http/dialogs/* ; do \
$(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/dialogs/`basename $${i}` ; \
done
for i in $(srcdir)/share/http/js/*.* ; do \
$(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/js/`basename $${i}` ; \
done
for i in $(srcdir)/share/http/images/*.* ; do \
$(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/images/`basename $${i}` ; \
done
for i in $(srcdir)/share/http/requests/*.* ; do \
$(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/requests/`basename $${i}` ; \
done
$(INSTALL) -m 644 $(srcdir)/share/http/requests/README.txt $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/requests/README.txt
$(INSTALL) -m 644 $(srcdir)/share/vlc512x512.png $(top_builddir)/VLC-release.app/Contents/MacOS/share/vlc512x512.png
$(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/locale
cat $(top_srcdir)/po/LINGUAS | while read i; do \
......@@ -716,9 +695,6 @@ if BUILD_LUA
cp -r $(destdir)/share/vlc/lua/* $(win32_destdir)/lua
endif
if BUILD_HTTPD
cp -r $(destdir)/share/vlc/http $(win32_destdir)
endif
if BUILD_SKINS
cp -r $(destdir)/share/vlc/skins2 $(win32_destdir)/skins
endif
......
......@@ -55,6 +55,7 @@ Interfaces
* Skins2: fullscreen controller support, relative placement support
and important cleanups and optimisations
* ncurses: heavy refactor of the complete interface
* removal of http interface in favor of luahttp
Video Output:
* New video output based on Direct2D for Windows 7 and Vista (with Platform Update)
......
......@@ -335,7 +335,7 @@ case "${host_os}" in
VLC_ADD_LDFLAGS([vlc],[-mwindows])
VLC_ADD_LIBS([win32text],[-lgdi32])
VLC_ADD_LIBS([cdda vcdx sdl_image aout_sdl vout_sdl],[-lwinmm])
VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_shout access_output_rtmp sap oldhttp stream_out_standard stream_out_select stream_out_rtp stream_out_raop vod_rtsp access_realrtsp rtp oldrc netsync gnutls growl_udp flac ts audioscrobbler lua remoteosd zvbi audiobargraph_a netsync],[-lws2_32])
VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_shout access_output_rtmp sap stream_out_standard stream_out_select stream_out_rtp stream_out_raop vod_rtsp access_realrtsp rtp oldrc netsync gnutls growl_udp flac ts audioscrobbler lua remoteosd zvbi audiobargraph_a netsync],[-lws2_32])
VLC_ADD_LIBS([filesystem], [-lshlwapi])
dnl
dnl DEP and ASLR options
......@@ -366,7 +366,7 @@ case "${host_os}" in
fi
if test "${SYS}" = "mingwce"; then
# add ws2 for closesocket, select, recv
VLC_ADD_LIBS([libvlccore access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_rtmp sap oldhttp netsync audioscrobbler growl rtp stream_out_standard stream_out_select stream_out_rtp remoteosd ts audiobargraph_a netsync],[-lws2])
VLC_ADD_LIBS([libvlccore access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_rtmp sap netsync audioscrobbler growl rtp stream_out_standard stream_out_select stream_out_rtp remoteosd ts audiobargraph_a netsync],[-lws2])
VLC_ADD_LIBS([libvlccore],[-lmmtimer])
AC_CHECK_PROGS(U2D, [unix2dos todos], unix2dos)
ac_default_prefix="`pwd`/_wince"
......@@ -1642,7 +1642,6 @@ AC_ARG_ENABLE(httpd,
[ --enable-httpd HTTP daemon (default enabled)])
if test "${enable_httpd}" != "no"
then
VLC_ADD_PLUGIN([oldhttp])
AC_DEFINE(ENABLE_HTTPD, 1, Define if you want the HTTP dameon support)
fi
AM_CONDITIONAL(BUILD_HTTPD, [test "${enable_httpd}" != "no"])
......@@ -4241,7 +4240,6 @@ AC_CONFIG_FILES([
modules/codec/spudec/Makefile
modules/codec/wmafixed/Makefile
modules/control/Makefile
modules/control/http/Makefile
modules/control/dbus/Makefile
modules/control/globalhotkeys/Makefile
modules/demux/Makefile
......
......@@ -528,7 +528,6 @@ Section $Name_Section01 SEC01
!insertmacro InstallFolder locale
@BUILD_OSDMENU_TRUE@ !insertmacro InstallFolder osdmenu
@BUILD_SKINS_TRUE@ !insertmacro InstallFolder skins
@BUILD_HTTPD_TRUE@ !insertmacro InstallFolder http
@BUILD_LUA_TRUE@ !insertmacro InstallFolder lua
; Generate the cache and add it to uninstall.log
......
SUBDIRS = http globalhotkeys dbus
SUBDIRS = globalhotkeys dbus
SOURCES_gestures = gestures.c
SOURCES_netsync = netsync.c
SOURCES_ntservice = ntservice.c
......
SOURCES_oldhttp = \
http.c \
http.h \
rpn.c \
macro.c \
macros.h \
mvar.c \
util.c \
$(NULL)
/*****************************************************************************
* http.c : HTTP/HTTPS Remote control interface
*****************************************************************************
* Copyright (C) 2001-2006 the VideoLAN team
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Laurent Aimar <fenrir@via.ecp.fr>
* Christophe Massiot <massiot@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "http.h"
#include <vlc_plugin.h>
#include <vlc_url.h>
#include <vlc_fs.h>
#include <assert.h>
/*****************************************************************************
* Module descriptor
*****************************************************************************/
static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
#define HOST_TEXT N_( "Host address" )
#define HOST_LONGTEXT N_( \
"Address and port the HTTP interface will listen on. It defaults to " \
"all network interfaces (0.0.0.0)." \
" If you want the HTTP interface to be available only on the local " \
"machine, enter 127.0.0.1" )
#define SRC_TEXT N_( "Source directory" )
#define SRC_LONGTEXT N_( "Source directory" )
#define HANDLERS_TEXT N_( "Handlers" )
#define HANDLERS_LONGTEXT N_( \
"List of handler extensions and executable paths (for instance: " \
"php=/usr/bin/php,pl=/usr/bin/perl)." )
#define ART_TEXT N_( "Export album art as /art" )
#define ART_LONGTEXT N_( \
"Allow exporting album art for current playlist items at the " \
"/art and /art?id=<id> URLs." )
#define CERT_TEXT N_( "Certificate file" )
#define CERT_LONGTEXT N_( "HTTP interface x509 PEM certificate file " \
"(enables SSL)." )
#define KEY_TEXT N_( "Private key file" )
#define KEY_LONGTEXT N_( "HTTP interface x509 PEM private key file." )
#define CA_TEXT N_( "Root CA file" )
#define CA_LONGTEXT N_( "HTTP interface x509 PEM trusted root CA " \
"certificates file." )
#define CRL_TEXT N_( "CRL file" )
#define CRL_LONGTEXT N_( "HTTP interace Certificates Revocation List file." )
vlc_module_begin ()
set_shortname( N_("HTTP"))
set_description( N_("HTTP remote control interface") )
set_category( CAT_INTERFACE )
set_subcategory( SUBCAT_INTERFACE_MAIN )
add_string ( "http-host", NULL, HOST_TEXT, HOST_LONGTEXT, true )
add_string ( "http-src", NULL, SRC_TEXT, SRC_LONGTEXT, true )
#if defined( HAVE_FORK ) || defined( WIN32 )
add_string ( "http-handlers", NULL, HANDLERS_TEXT, HANDLERS_LONGTEXT, true )
#endif
add_bool ( "http-album-art", false, ART_TEXT, ART_LONGTEXT, true )
set_section( N_("HTTP SSL" ), 0 )
add_loadfile ( "http-intf-cert", NULL, CERT_TEXT, CERT_LONGTEXT, true )
add_loadfile ( "http-intf-key", NULL, KEY_TEXT, KEY_LONGTEXT, true )
add_loadfile ( "http-intf-ca", NULL, CA_TEXT, CA_LONGTEXT, true )
add_loadfile ( "http-intf-crl", NULL, CRL_TEXT, CRL_LONGTEXT, true )
set_capability( "interface", 0 )
set_callbacks( Open, Close )
add_shortcut( "http" )
vlc_module_end ()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
int ArtCallback( httpd_handler_sys_t *p_args,
httpd_handler_t *p_handler, char *_p_url,
uint8_t *_p_request, int i_type,
uint8_t *_p_in, int i_in,
char *psz_remote_addr, char *psz_remote_host,
uint8_t **pp_data, int *pi_data );
/*****************************************************************************
* Activate: initialize and create stuff
*****************************************************************************/
static int Open( vlc_object_t *p_this )
{
intf_thread_t *p_intf = (intf_thread_t*)p_this;
intf_sys_t *p_sys;
char *psz_address;
char *psz_cert = NULL, *psz_key = NULL, *psz_ca = NULL,
*psz_crl = NULL;
int i_port = 0;
char *psz_src = NULL;
psz_address = var_CreateGetNonEmptyString( p_intf, "http-host" );
if( psz_address != NULL )
{
char *psz_parser = strrchr( psz_address, ':' );
if( psz_parser )
{
*psz_parser++ = '\0';
i_port = atoi( psz_parser );
}
}
else
psz_address = strdup("");
p_intf->p_sys = p_sys = malloc( sizeof( intf_sys_t ) );
if( !p_intf->p_sys )
{
free( psz_address );
return( VLC_ENOMEM );
}
p_sys->p_playlist = pl_Get( p_this );
p_sys->p_input = NULL;
p_sys->p_vlm = NULL;
p_sys->psz_address = psz_address;
p_sys->i_port = i_port;
p_sys->p_art_handler = NULL;
/* determine file handler associations */
p_sys->i_handlers = 0;
p_sys->pp_handlers = NULL;
#if defined( HAVE_FORK ) || defined( WIN32 )
psz_src = var_InheritString( p_intf, "http-handlers" );
if( psz_src != NULL )
{
char *p = psz_src;
while( p != NULL )
{
http_association_t *p_handler;
char *psz_ext = p;
char *psz_program, *psz_options;
p = strchr( p, '=' );
if( p == NULL ) break;
*p++ = '\0';
psz_program = p;
p = strchr( p, ',' );
if( p != NULL )
*p++ = '\0';
p_handler = malloc( sizeof( http_association_t ) );
p_handler->psz_ext = strdup( psz_ext );
psz_options = FirstWord( psz_program, psz_program );
p_handler->i_argc = 0;
p_handler->ppsz_argv = NULL;
TAB_APPEND( p_handler->i_argc, p_handler->ppsz_argv,
strdup( psz_program ) );
while( psz_options != NULL && *psz_options )
{
char *psz_next = FirstWord( psz_options, psz_options );
TAB_APPEND( p_handler->i_argc, p_handler->ppsz_argv,
strdup( psz_options ) );
psz_options = psz_next;
}
/* NULL will be appended later on */
TAB_APPEND( p_sys->i_handlers, p_sys->pp_handlers, p_handler );
}
free( psz_src );
}
#endif
/* determine SSL configuration */
psz_cert = var_InheritString( p_intf, "http-intf-cert" );
if ( psz_cert != NULL )
{
msg_Dbg( p_intf, "enabling TLS for HTTP interface (cert file: %s)",
psz_cert );
psz_key = var_InheritString( p_intf, "http-intf-key" );
psz_ca = var_InheritString( p_intf, "http-intf-ca" );
psz_crl = var_InheritString( p_intf, "http-intf-crl" );
if( i_port <= 0 )
i_port = 8443;
}
else
{
if( i_port <= 0 )
i_port= 8080;
}
msg_Dbg( p_intf, "base %s:%d", psz_address, i_port );
p_sys->p_httpd_host = httpd_TLSHostNew( VLC_OBJECT(p_intf), psz_address,
i_port, psz_cert, psz_key, psz_ca,
psz_crl );
free( psz_cert );
free( psz_key );
free( psz_ca );
free( psz_crl );
if( p_sys->p_httpd_host == NULL )
{
msg_Err( p_intf, "cannot listen on %s:%d", psz_address, i_port );
free( p_sys->psz_address );
free( p_sys );
return VLC_EGENERIC;
}
else
{
char psz_tmp[NI_MAXHOST + 6];
/* Ugly hack to run several HTTP servers on different ports */
snprintf( psz_tmp, sizeof (psz_tmp), "%s:%d", psz_address, i_port + 1 );
var_Create(p_intf->p_libvlc, "http-host", VLC_VAR_STRING );
var_SetString( p_intf->p_libvlc, "http-host", psz_tmp );
}
p_sys->i_files = 0;
p_sys->pp_files = NULL;
psz_src = var_InheritString( p_intf, "http-src" );
if( psz_src == NULL )
{
char *data_path = config_GetDataDir( p_intf );
if( asprintf( &psz_src, "%s" DIR_SEP "http", data_path ) == -1 )
psz_src = NULL;
free( data_path );
}
if( psz_src == NULL )
{
msg_Err( p_intf, "invalid web interface source directory" );
goto failed;
}
/* remove trainling \ or / */
if( psz_src[strlen( psz_src ) - 1] == '\\' ||
psz_src[strlen( psz_src ) - 1] == '/' )
{
psz_src[strlen( psz_src ) - 1] = '\0';
}
ParseDirectory( p_intf, psz_src, psz_src );
if( p_sys->i_files <= 0 )
{
msg_Err( p_intf, "cannot find any file in directory %s", psz_src );
goto failed;
}
if( var_InheritBool( p_intf, "http-album-art" ) )
{
/* FIXME: we're leaking h */
httpd_handler_sys_t *h = malloc( sizeof( httpd_handler_sys_t ) );
if( !h )
goto failed;
h->file.p_intf = p_intf;
h->file.file = NULL;
h->file.name = NULL;
/* TODO: use ACL and login/password stuff here too */
h->p_handler = httpd_HandlerNew( p_sys->p_httpd_host,
"/art", NULL, NULL, NULL,
ArtCallback, h );
p_sys->p_art_handler = h->p_handler;
}
free( psz_src );
return VLC_SUCCESS;
failed:
free( psz_src );
free( p_sys->pp_files );
httpd_HostDelete( p_sys->p_httpd_host );
free( p_sys->psz_address );
free( p_sys );
return VLC_EGENERIC;
}
/*****************************************************************************
* Close: destroy interface
*****************************************************************************/
static void Close ( vlc_object_t *p_this )
{
intf_thread_t *p_intf = (intf_thread_t *)p_this;
intf_sys_t *p_sys = p_intf->p_sys;
int i;
#ifdef ENABLE_VLM
if( p_sys->p_vlm )
vlm_Delete( p_sys->p_vlm );
#endif
for( i = 0; i < p_sys->i_files; i++ )
{
if( p_sys->pp_files[i]->b_handler )
httpd_HandlerDelete( ((httpd_handler_sys_t *)p_sys->pp_files[i])->p_handler );
else
httpd_FileDelete( p_sys->pp_files[i]->p_file );
if( p_sys->pp_files[i]->p_redir )
httpd_RedirectDelete( p_sys->pp_files[i]->p_redir );
if( p_sys->pp_files[i]->p_redir2 )
httpd_RedirectDelete( p_sys->pp_files[i]->p_redir2 );
free( p_sys->pp_files[i]->file );
free( p_sys->pp_files[i]->name );
free( p_sys->pp_files[i] );
}
free( p_sys->pp_files );
for( i = 0; i < p_sys->i_handlers; i++ )
{
http_association_t *p_handler = p_sys->pp_handlers[i];
int j;
free( p_handler->psz_ext );
for( j = 0; j < p_handler->i_argc; j++ )
free( p_handler->ppsz_argv[j] );
if( p_handler->i_argc )
free( p_handler->ppsz_argv );
free( p_handler );
}
if( p_sys->i_handlers )
free( p_sys->pp_handlers );
if( p_sys->p_art_handler )
httpd_HandlerDelete( p_sys->p_art_handler );
httpd_HostDelete( p_sys->p_httpd_host );
free( p_sys->psz_address );
free( p_sys );
}
/****************************************************************************
* HttpCallback:
****************************************************************************
* a file with b_html is parsed and all "macro" replaced
****************************************************************************/
static void Callback404( httpd_file_sys_t *p_args, char **pp_data,
int *pi_data )
{
char *p = *pp_data = malloc( 10240 );
if( !p )
{
return;
}
p += sprintf( p, "Content-Type: text/html\n" );
p += sprintf( p, "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n" );
p += sprintf( p, "<head>\n" );
p += sprintf( p, "<title>Error loading %s</title>\n", p_args->file );
p += sprintf( p, "</head>\n" );
p += sprintf( p, "<body>\n" );
p += sprintf( p, "<h1><center>Error loading %s for %s</center></h1>\n", p_args->file, p_args->name );
p += sprintf( p, "<a href=\"http://www.videolan.org/\">VideoLAN</a>\n" );
p += sprintf( p, "</body>\n" );
p += sprintf( p, "</html>\n" );
*pi_data = strlen( *pp_data );
}
static void ParseExecute( httpd_file_sys_t *p_args, char *p_buffer,
int i_buffer, char *p_request,
char **pp_data, int *pi_data )
{
intf_sys_t *p_sys = p_args->p_intf->p_sys;
int i_request = p_request != NULL ? strlen( p_request ) : 0;
char *dst;
char position[4]; /* percentage */
char time[12]; /* in seconds */
char length[12]; /* in seconds */
audio_volume_t i_volume;
char volume[5];
const char *state;
char stats[20];
assert( p_sys->p_input == NULL );
/* FIXME: proper locking anyone? */
p_sys->p_input = playlist_CurrentInput( p_sys->p_playlist );
if( p_sys->p_input )
{
snprintf( position, sizeof(position), "%d",
(int)(var_GetFloat( p_sys->p_input, "position" ) * 100.));
snprintf( time, sizeof(time), "%"PRIi64,
var_GetTime( p_sys->p_input, "time" ) / CLOCK_FREQ );
snprintf( length, sizeof(length), "%"PRIi64,
var_GetTime( p_sys->p_input, "length" ) / CLOCK_FREQ );
switch( var_GetInteger( p_sys->p_input, "state" ) )
{
case PLAYING_S: state = "playing"; break;
case OPENING_S: state = "opening/connecting"; break;
case PAUSE_S: state = "paused"; break;
default: state = "stop"; break;
}
}
else
{
strcpy( position, "0" );
strcpy( time, "0" );
strcpy( length, "0" );
state = "stop";
}
i_volume = aout_VolumeGet( p_sys->p_playlist );
snprintf( volume, sizeof(volume), "%d", (int)i_volume );
p_args->vars = mvar_New( "variables", "" );
mvar_AppendNewVar( p_args->vars, "url_param",
i_request > 0 ? "1" : "0" );
mvar_AppendNewVar( p_args->vars, "url_value", p_request );
mvar_AppendNewVar( p_args->vars, "version", VERSION_MESSAGE );
mvar_AppendNewVar( p_args->vars, "copyright", COPYRIGHT_MESSAGE );
mvar_AppendNewVar( p_args->vars, "vlc_compile_by", VLC_CompileBy() );
mvar_AppendNewVar( p_args->vars, "vlc_compile_host",
VLC_CompileHost() );
mvar_AppendNewVar( p_args->vars, "vlc_compiler", VLC_Compiler() );
mvar_AppendNewVar( p_args->vars, "stream_position", position );
mvar_AppendNewVar( p_args->vars, "stream_time", time );
mvar_AppendNewVar( p_args->vars, "stream_length", length );
mvar_AppendNewVar( p_args->vars, "volume", volume );
mvar_AppendNewVar( p_args->vars, "stream_state", state );
mvar_AppendNewVar( p_args->vars, "charset", "UTF-8" );
/* Stats */
if( p_sys->p_input )
{
/* FIXME: Workarround a stupid assert in input_GetItem */
input_item_t *p_item = p_sys->p_input && p_sys->p_input->p
? input_GetItem( p_sys->p_input )
: NULL;
if( p_item )
{
vlc_mutex_lock( &p_item->p_stats->lock );
#define STATS_INT( n ) sprintf( stats, "%"PRIi64, p_item->p_stats->i_ ## n ); \
mvar_AppendNewVar( p_args->vars, #n, stats );
#define STATS_FLOAT( n ) sprintf( stats, "%f", p_item->p_stats->f_ ## n ); \
mvar_AppendNewVar( p_args->vars, #n, stats );
STATS_INT( read_bytes )
STATS_FLOAT( input_bitrate )
STATS_INT( demux_read_bytes )
STATS_FLOAT( demux_bitrate )
STATS_INT( decoded_video )
STATS_INT( displayed_pictures )
STATS_INT( lost_pictures )
STATS_INT( decoded_audio )
STATS_INT( played_abuffers )
STATS_INT( lost_abuffers )
STATS_INT( sent_packets )
STATS_INT( sent_bytes )
STATS_FLOAT( send_bitrate )
#undef STATS_INT
#undef STATS_FLOAT
vlc_mutex_unlock( &p_item->p_stats->lock );
}
}
SSInit( &p_args->stack );
/* allocate output */
*pi_data = i_buffer + 1000;
dst = *pp_data = malloc( *pi_data );
/* we parse executing all <vlc /> macros */
Execute( p_args, p_request, i_request, pp_data, pi_data, &dst,
&p_buffer[0], &p_buffer[i_buffer] );
*dst = '\0';
*pi_data = dst - *pp_data;
if( p_sys->p_input != NULL )
{
vlc_object_release( p_sys->p_input );
p_sys->p_input = NULL;
}
SSClean( &p_args->stack );
mvar_Delete( p_args->vars );
}
int HttpCallback( httpd_file_sys_t *p_args,
httpd_file_t *p_file,
uint8_t *_p_request,
uint8_t **_pp_data, int *pi_data )
{
VLC_UNUSED(p_file);
char *p_request = (char *)_p_request;
char **pp_data = (char **)_pp_data;
FILE *f;
if( ( f = vlc_fopen( p_args->file, "r" ) ) == NULL )
{
Callback404( p_args, pp_data, pi_data );
return VLC_SUCCESS;
}
if( !p_args->b_html )
{
FileLoad( f, pp_data, pi_data );
}
else