dlna: fake out implementation of X_MS_MediaReceiverRegistrar

Using the same responses as minidlna.

Fixes #3502.
This commit is contained in:
Dan Walters
2019-09-17 12:52:02 +01:00
committed by Nick Craig-Wood
parent 2f10472df3
commit 5f07bbf8ce
4 changed files with 86 additions and 1 deletions
+4 -1
View File
@@ -116,6 +116,9 @@ func newServer(f fs.Fs, opt *dlnaflags.Options) *server {
"ConnectionManager": &connectionManagerService{
server: s,
},
"X_MS_MediaReceiverRegistrar": &mediaReceiverRegistrarService{
server: s,
},
}
// Setup the various http routes.
@@ -248,7 +251,7 @@ func (s *server) rootDescHandler(w http.ResponseWriter, r *http.Request) {
// Handle a service control HTTP request.
func (s *server) serviceControlHandler(w http.ResponseWriter, r *http.Request) {
soapActionString := r.Header.Get("SOAPACTION")
soapAction, err := upnp.ParseActionHTTPHeader(soapActionString)
soapAction, err := parseActionHTTPHeader(soapActionString)
if err != nil {
serveError(s, w, "Could not parse SOAPACTION header", err)
return