Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Icecast-Server
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
102
Issues
102
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
Icecast-Server
Commits
24a24d8d
Commit
24a24d8d
authored
Oct 01, 2005
by
Karl Heyes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add hack for nsvcap, apparently EOL is 3 chars
svn path=/icecast/trunk/icecast/; revision=10110
parent
c568f5d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
4 deletions
+22
-4
src/connection.c
src/connection.c
+22
-4
No files found.
src/connection.c
View file @
24a24d8d
...
...
@@ -340,6 +340,8 @@ static void process_request_queue ()
int
pass_it
=
1
;
char
*
ptr
;
/* handle \n, \r\n and nsvcap which for some strange reason has
* EOL as \r\r\n */
node
->
offset
+=
len
;
client
->
refbuf
->
data
[
node
->
offset
]
=
'\000'
;
do
...
...
@@ -347,6 +349,8 @@ static void process_request_queue ()
if
(
node
->
shoutcast
==
1
)
{
/* password line */
if
(
strstr
(
client
->
refbuf
->
data
,
"
\r\r\n
"
)
!=
NULL
)
break
;
if
(
strstr
(
client
->
refbuf
->
data
,
"
\r\n
"
)
!=
NULL
)
break
;
if
(
strstr
(
client
->
refbuf
->
data
,
"
\n
"
)
!=
NULL
)
...
...
@@ -354,6 +358,12 @@ static void process_request_queue ()
}
/* stream_offset refers to the start of any data sent after the
* http style headers, we don't want to lose those */
ptr
=
strstr
(
client
->
refbuf
->
data
,
"
\r\r\n\r\r\n
"
);
if
(
ptr
)
{
node
->
stream_offset
=
(
ptr
+
6
)
-
client
->
refbuf
->
data
;
break
;
}
ptr
=
strstr
(
client
->
refbuf
->
data
,
"
\r\n\r\n
"
);
if
(
ptr
)
{
...
...
@@ -882,14 +892,20 @@ static void _handle_shoutcast_compatible (client_queue_t *node)
config_release_config
();
/* Get rid of trailing \r\n or \n after password */
ptr
=
strstr
(
client
->
refbuf
->
data
,
"
\r\n
"
);
ptr
=
strstr
(
client
->
refbuf
->
data
,
"
\r\
r\
n
"
);
if
(
ptr
)
headers
=
ptr
+
2
;
headers
=
ptr
+
3
;
else
{
ptr
=
strstr
(
client
->
refbuf
->
data
,
"
\n
"
);
ptr
=
strstr
(
client
->
refbuf
->
data
,
"
\
r\
n
"
);
if
(
ptr
)
headers
=
ptr
+
1
;
headers
=
ptr
+
2
;
else
{
ptr
=
strstr
(
client
->
refbuf
->
data
,
"
\n
"
);
if
(
ptr
)
headers
=
ptr
+
1
;
}
}
if
(
ptr
==
NULL
)
...
...
@@ -915,6 +931,8 @@ static void _handle_shoutcast_compatible (client_queue_t *node)
free
(
source_password
);
return
;
}
else
INFO1
(
"password does not match
\"
%s
\"
"
,
client
->
refbuf
->
data
);
client_destroy
(
client
);
free
(
node
);
return
;
...
...
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