ClientProcess: close connection when client sends HTTP request
This commit is contained in:
parent
b177bffa6a
commit
ab05b70423
1
NEWS
1
NEWS
|
@ -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
|
||||
|
|
|
@ -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\"",
|
||||
|
|
Loading…
Reference in New Issue