* http.c: HTTP access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: http.c,v 1.17 2002/12/12 15:10:58 gbazin Exp $
+ * $Id: http.c,v 1.24 2003/02/20 01:52:45 sigmunau Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*****************************************************************************/
#include <stdlib.h>
#include <string.h>
+#include <sys/time.h>
#include <vlc/vlc.h>
#include <vlc/input.h>
# include <fcntl.h>
#endif
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#elif defined( _MSC_VER ) && defined( _WIN32 ) && !defined( UNDER_CE )
#define PROXY_TEXT N_("specify an HTTP proxy")
#define PROXY_LONGTEXT N_( \
"Specify an HTTP proxy to use. It must be in the form " \
- "http://myproxy.mydomain:myport . If none is specified, the HTTP_PROXY" \
+ "http://myproxy.mydomain:myport. If none is specified, the HTTP_PROXY " \
"environment variable will be tried." )
#define CACHING_TEXT N_("caching value in ms")
"value should be set in miliseconds units." )
vlc_module_begin();
- add_category_hint( N_("http"), NULL );
- add_string( "http-proxy", NULL, NULL, PROXY_TEXT, PROXY_LONGTEXT );
- add_integer( "http-caching", 4 * DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT );
+ add_category_hint( N_("http"), NULL, VLC_FALSE );
+ add_string( "http-proxy", NULL, NULL, PROXY_TEXT, PROXY_LONGTEXT, VLC_FALSE );
+ add_integer( "http-caching", 4 * DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
set_description( _("HTTP access module") );
set_capability( "access", 0 );
add_shortcut( "http" );
while( *psz_parser && *psz_parser != ':' && *psz_parser != '/' )
{
+ if( *psz_parser == '[' )
+ {
+ /* IPv6 address */
+ while( *psz_parser && *psz_parser != ']' )
+ {
+ psz_parser++;
+ }
+ }
psz_parser++;
}
p_access_data->socket_desc.i_type = NETWORK_TCP;
snprintf( p_access_data->psz_buffer, MAX_QUERY_SIZE,
- "GET http://%s:%d/%s\r\n HTTP/1.0\r\n",
+ "GET http://%s:%d/%s HTTP/1.0\r\n",
psz_server_addr, i_server_port, psz_path );
}
else
vlc_mutex_lock( &p_input->stream.stream_lock );
p_input->stream.b_pace_control = VLC_TRUE;
p_input->stream.b_seekable = VLC_TRUE;
+ p_input->stream.b_connected = VLC_TRUE;
p_input->stream.p_selected_area->i_tell = 0;
p_input->stream.p_selected_area->i_size = 0;
p_input->stream.i_method = INPUT_METHOD_NETWORK;