dlna: fix SOAP action header parsing - fixes #6354

Changes in github.com/anacrolix/dms changed upnp.ServiceURN to include a
namespace identifier. This identifier was previously hardcoded, but is
now parsed out of the URN. The old SOAP action header parsing logic was
duplicated in rclone and did not handle this field. Resulting responses
included a URN with an empty namespace identifier, breaking clients.
This commit is contained in:
Joram Schrijver
2022-08-06 17:23:37 +01:00
committed by Nick Craig-Wood
parent df513ca90a
commit 5a6d233924
3 changed files with 3 additions and 35 deletions
+1 -1
View File
@@ -186,7 +186,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 := parseActionHTTPHeader(soapActionString)
soapAction, err := upnp.ParseActionHTTPHeader(soapActionString)
if err != nil {
serveError(s, w, "Could not parse SOAPACTION header", err)
return