Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
460cfba6
Commit
460cfba6
authored
Nov 18, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QueueCommands: workaround for buggy clients that send "add /"
parent
7c6b991d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
NEWS
NEWS
+2
-0
QueueCommands.cxx
src/command/QueueCommands.cxx
+10
-1
No files found.
NEWS
View file @
460cfba6
ver 0.19.4 (not yet released)
* protocol
- workaround for buggy clients that send "add /"
* decoder
- opus: add MIME types audio/ogg and application/ogg
...
...
src/command/QueueCommands.cxx
View file @
460cfba6
...
...
@@ -61,7 +61,16 @@ translate_uri(Client &client, const char *uri)
CommandResult
handle_add
(
Client
&
client
,
gcc_unused
unsigned
argc
,
char
*
argv
[])
{
const
char
*
const
uri
=
translate_uri
(
client
,
argv
[
1
]);
const
char
*
uri
=
argv
[
1
];
if
(
memcmp
(
uri
,
"/"
,
2
)
==
0
)
/* this URI is malformed, but some clients are buggy
and use "add /" to add the whole database, which
was never intended to work, but once did; in order
to retain backwards compatibility, work around this
here */
uri
=
""
;
uri
=
translate_uri
(
client
,
uri
);
if
(
uri
==
nullptr
)
return
CommandResult
::
ERROR
;
...
...
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