Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
882422ab
Commit
882422ab
authored
Oct 03, 2001
by
Sam Hocevar
Browse files
* Added User-Agent header in the HTTP input.
* Fixed an input segfault which occured using ES input.
parent
5d011ad3
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/config.h.in
View file @
882422ab
...
...
@@ -45,7 +45,7 @@
/* "(" PROGRAM_BUILD ") (" PROGRAM_OPTIONS ")\n" */ \
"Copyright 1996-2001 VideoLAN\n"
#define COPYRIGHT_MESSAGE "VideoLAN Client - version @VLC_VERSION@" \
" @VLC_CODENAME@ - (C)1996-2001 VideoLAN
\n
"
" @VLC_CODENAME@ - (C)1996-2001 VideoLAN"
#define VERSION "@VLC_VERSION@"
...
...
src/input/input.c
View file @
882422ab
...
...
@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input.c,v 1.14
0
2001/10/03 1
3
:1
4:0
5 sam Exp $
* $Id: input.c,v 1.14
1
2001/10/03 1
5
:1
0:5
5 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -1173,17 +1173,22 @@ static void HTTPOpen( input_thread_t * p_input )
p_input
->
stream
.
b_seekable
=
0
;
p_input
->
stream
.
b_pace_control
=
1
;
/* TCP/IP... */
# define HTTP_USERAGENT "User-Agent: " COPYRIGHT_MESSAGE "\r\n"
# define HTTP_END "\r\n"
/* Prepare GET ... */
if
(
psz_proxy
!=
NULL
)
{
snprintf
(
psz_buffer
,
sizeof
(
psz_buffer
),
"GET http://%s:%d/%s HTTP/1.0
\r\n\r\n
"
,
psz_server
,
i_port
,
psz_path
);
"GET http://%s:%d/%s HTTP/1.0
\r\n
"
HTTP_USERAGENT
HTTP_END
,
psz_server
,
i_port
,
psz_path
);
}
else
{
snprintf
(
psz_buffer
,
sizeof
(
psz_buffer
),
"GET /%s HTTP/1.0
\r\n
Host: %s
\r\n\r\n
"
,
"GET /%s HTTP/1.0
\r\n
Host: %s
\r\n
"
HTTP_USERAGENT
HTTP_END
,
psz_path
,
psz_server
);
}
psz_buffer
[
sizeof
(
psz_buffer
)
-
1
]
=
'\0'
;
...
...
src/input/input_programs.c
View file @
882422ab
...
...
@@ -2,7 +2,7 @@
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_programs.c,v 1.6
2
2001/10/0
2
1
6:46:59 massiot
Exp $
* $Id: input_programs.c,v 1.6
3
2001/10/0
3
1
5:10:55 sam
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -76,6 +76,10 @@ int input_InitStream( input_thread_t * p_input, size_t i_data_len )
}
memset
(
p_input
->
stream
.
p_demux_data
,
0
,
i_data_len
);
}
else
{
p_input
->
stream
.
p_demux_data
=
NULL
;
}
return
0
;
}
...
...
@@ -191,6 +195,10 @@ pgrm_descriptor_t * input_AddProgram( input_thread_t * p_input,
memset
(
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
p_demux_data
,
0
,
i_data_len
);
}
else
{
p_input
->
stream
.
pp_programs
[
i_pgrm_index
]
->
p_demux_data
=
NULL
;
}
return
p_input
->
stream
.
pp_programs
[
i_pgrm_index
];
}
...
...
src/interface/main.c
View file @
882422ab
...
...
@@ -4,7 +4,7 @@
* and spawn threads.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: main.c,v 1.11
6
2001/10/0
1
1
6
:1
8:49 massiot
Exp $
* $Id: main.c,v 1.11
7
2001/10/0
3
1
5
:1
0:55 sam
Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -304,7 +304,7 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
return
(
errno
);
}
intf_MsgImm
(
COPYRIGHT_MESSAGE
);
intf_MsgImm
(
COPYRIGHT_MESSAGE
"
\n
"
);
/*
* Read configuration
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment