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
ab05b704
Commit
ab05b704
authored
Aug 12, 2014
by
Max Kellermann
Committed by
Max Kellermann
Oct 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ClientProcess: close connection when client sends HTTP request
parent
b177bffa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
NEWS
NEWS
+1
-0
ClientProcess.cxx
src/client/ClientProcess.cxx
+9
-0
No files found.
NEWS
View file @
ab05b704
...
...
@@ -2,6 +2,7 @@ ver 0.21 (not yet released)
* protocol
- "tagtypes" can be used to hide tags
- "find" and "search" can sort
- close connection when client sends HTTP request
* tags
- new tag "OriginalDate"
* decoder
...
...
src/client/ClientProcess.cxx
View file @
ab05b704
...
...
@@ -23,6 +23,7 @@
#include "command/AllCommands.hxx"
#include "Log.hxx"
#include "util/StringAPI.hxx"
#include "util/CharUtil.hxx"
#define CLIENT_LIST_MODE_BEGIN "command_list_begin"
#define CLIENT_LIST_OK_MODE_BEGIN "command_list_ok_begin"
...
...
@@ -118,6 +119,14 @@ client_process_line(Client &client, char *line)
}
else
if
(
StringIsEqual
(
line
,
CLIENT_LIST_OK_MODE_BEGIN
))
{
client
.
cmd_list
.
Begin
(
true
);
ret
=
CommandResult
::
OK
;
}
else
if
(
IsUpperAlphaASCII
(
*
line
))
{
/* no valid MPD command begins with an upper
case letter; this could be a badly routed
HTTP request */
FormatWarning
(
client_domain
,
"[%u] malformed command
\"
%s
\"
"
,
client
.
num
,
line
);
ret
=
CommandResult
::
CLOSE
;
}
else
{
FormatDebug
(
client_domain
,
"[%u] process command
\"
%s
\"
"
,
...
...
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