Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
706d6807
Commit
706d6807
authored
Sep 10, 2003
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Workaround for buggy IceCast servers who identify themselves as HTTP
and not ICY (who talked about RadioPI ?)
parent
c31fd0b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
modules/access/http.c
modules/access/http.c
+18
-4
No files found.
modules/access/http.c
View file @
706d6807
...
...
@@ -2,7 +2,7 @@
* http.c: HTTP access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: http.c,v 1.4
3 2003/08/02 19:30:35 bigben
Exp $
* $Id: http.c,v 1.4
4 2003/09/10 13:39:29 zorglub
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -214,6 +214,7 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
psz_parser
+=
strlen
(
"HTTP/1.x"
);
i_size
-=
strlen
(
"HTTP/1.x"
);
}
else
if
(
(
(
size_t
)
i_size
>=
strlen
(
"ICY"
)
&&
!
strncmp
(
psz_parser
,
"ICY"
,
strlen
(
"ICY"
)
)
)
)
...
...
@@ -233,7 +234,18 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
msg_Err
(
p_input
,
"invalid HTTP reply '%s'"
,
psz_parser
);
return
VLC_EGENERIC
;
}
/* Check for buggy Icecast servers */
if
(
strstr
(
psz_parser
,
"x-audiocast"
)
)
{
i_protocol
=
ICY_PROTOCOL
;
if
(
!
p_input
->
psz_demux
||
!*
p_input
->
psz_demux
)
{
msg_Info
(
p_input
,
"ICY server found, mp3 demuxer selected"
);
p_input
->
psz_demux
=
"mp3"
;
// FIXME strdup ?
}
}
/* Check the HTTP return code */
i_code
=
atoi
(
(
char
*
)
psz_parser
);
msg_Dbg
(
p_input
,
"%s server replied: %i"
,
...
...
@@ -719,7 +731,8 @@ static int Open( vlc_object_t *p_this )
p_access_data
->
socket_desc
.
i_ttl
=
0
;
snprintf
(
p_access_data
->
psz_buffer
,
MAX_QUERY_SIZE
,
"GET http://%s:%d/%s HTTP/1.0
\r\n
"
,
"GET http://%s:%d/%s HTTP/1.0
\r\n
"
\
"Icy-Metadata:0
\r\n
"
,
psz_server_addr
,
i_server_port
,
psz_path
);
}
else
...
...
@@ -731,7 +744,8 @@ static int Open( vlc_object_t *p_this )
p_access_data
->
socket_desc
.
i_ttl
=
0
;
snprintf
(
p_access_data
->
psz_buffer
,
MAX_QUERY_SIZE
,
"GET /%s HTTP/1.1
\r\n
Host: %s
\r\n
"
,
"GET /%s HTTP/1.1
\r\n
Host: %s
\r\n
"
\
"Icy-Metadata:0
\r\n
"
,
psz_path
,
psz_server_addr
);
}
p_access_data
->
psz_buffer
[
MAX_QUERY_SIZE
-
1
]
=
'\0'
;
...
...
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