output/httpd: remove broken DLNA support code
This code was added in 21851c0673
but
looks completely broken:
- the status code is "206 OK" but "206" would be "Partial Content"
- the "Content-Length" header has a bogus value
- the "Content-RangeX" parameter has different bogus values (why
"Content-RangeX" anyway and not "Content-Range"?)
Apart from that, there are strange undocumented non-standard headers
which are probably there to work around bugs/expectations in one
broken proprietary client product. But these days, MPD doesn't bend
over to support broken clients. So let's kill this code.
Closes #304
This commit is contained in:
parent
7d6a762845
commit
5f082a2739
2
NEWS
2
NEWS
@ -2,6 +2,8 @@ ver 0.20.21 (not yet released)
|
|||||||
* database
|
* database
|
||||||
- proxy: add "password" setting
|
- proxy: add "password" setting
|
||||||
- proxy: support tags "ArtistSort", "AlbumArtistSort", "AlbumSort"
|
- proxy: support tags "ArtistSort", "AlbumArtistSort", "AlbumSort"
|
||||||
|
* output
|
||||||
|
- httpd: remove broken DLNA support code
|
||||||
|
|
||||||
ver 0.20.20 (2018/05/22)
|
ver 0.20.20 (2018/05/22)
|
||||||
* protocol
|
* protocol
|
||||||
|
@ -122,15 +122,6 @@ HttpdClient::HandleLine(const char *line)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringEqualsCaseASCII(line, "transferMode.dlna.org: Streaming", 32)) {
|
|
||||||
/* Send as dlna */
|
|
||||||
dlna_streaming_requested = true;
|
|
||||||
/* metadata is not supported by dlna streaming, so disable it */
|
|
||||||
metadata_supported = false;
|
|
||||||
metadata_requested = false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* expect more request headers */
|
/* expect more request headers */
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -148,22 +139,7 @@ HttpdClient::SendResponse()
|
|||||||
|
|
||||||
assert(state == RESPONSE);
|
assert(state == RESPONSE);
|
||||||
|
|
||||||
if (dlna_streaming_requested) {
|
if (metadata_requested) {
|
||||||
snprintf(buffer, sizeof(buffer),
|
|
||||||
"HTTP/1.1 206 OK\r\n"
|
|
||||||
"Content-Type: %s\r\n"
|
|
||||||
"Content-Length: 10000\r\n"
|
|
||||||
"Content-RangeX: 0-1000000/1000000\r\n"
|
|
||||||
"transferMode.dlna.org: Streaming\r\n"
|
|
||||||
"Accept-Ranges: bytes\r\n"
|
|
||||||
"Connection: close\r\n"
|
|
||||||
"realTimeInfo.dlna.org: DLNA.ORG_TLAG=*\r\n"
|
|
||||||
"contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0\r\n"
|
|
||||||
"\r\n",
|
|
||||||
httpd.content_type);
|
|
||||||
response = buffer;
|
|
||||||
|
|
||||||
} else if (metadata_requested) {
|
|
||||||
allocated =
|
allocated =
|
||||||
icy_server_metadata_header(httpd.name, httpd.genre,
|
icy_server_metadata_header(httpd.name, httpd.genre,
|
||||||
httpd.website,
|
httpd.website,
|
||||||
@ -202,7 +178,6 @@ HttpdClient::HttpdClient(HttpdOutput &_httpd, int _fd, EventLoop &_loop,
|
|||||||
state(REQUEST),
|
state(REQUEST),
|
||||||
queue_size(0),
|
queue_size(0),
|
||||||
head_method(false),
|
head_method(false),
|
||||||
dlna_streaming_requested(false),
|
|
||||||
metadata_supported(_metadata_supported),
|
metadata_supported(_metadata_supported),
|
||||||
metadata_requested(false), metadata_sent(true),
|
metadata_requested(false), metadata_sent(true),
|
||||||
metaint(8192), /*TODO: just a std value */
|
metaint(8192), /*TODO: just a std value */
|
||||||
|
@ -82,11 +82,6 @@ class HttpdClient final
|
|||||||
*/
|
*/
|
||||||
bool head_method;
|
bool head_method;
|
||||||
|
|
||||||
/**
|
|
||||||
* If DLNA streaming was an option.
|
|
||||||
*/
|
|
||||||
bool dlna_streaming_requested;
|
|
||||||
|
|
||||||
/* ICY */
|
/* ICY */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user