"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
dlna: fix root XML service descriptor
Dan Walters95194adfd513
diff --git a/cmd/serve/dlna/dlna.go b/cmd/serve/dlna/dlna.goindex 960e7db32..b430634a4 100644--- a/cmd/serve/dlna/dlna.go+++ b/cmd/serve/dlna/dlna.go@@ -86,6 +86,13 @@ var services = []*service{},}+func init() {+ for _, s := range services {+ p := path.Join("/scpd", s.ServiceId)+ s.SCPDURL = p+ }+}+func devices() []string {return []string{"urn:schemas-upnp-org:device:MediaServer:1",@@ -250,9 +257,6 @@ func (s *server) initMux(mux *http.ServeMux) {// Install handlers to serve SCPD for each UPnP service.for _, s := range services {- p := path.Join("/scpd", s.ServiceId)- s.SCPDURL = p-mux.HandleFunc(s.SCPDURL, func(serviceDesc string) http.HandlerFunc {return func(w http.ResponseWriter, r *http.Request) {w.Header().Set("content-type", `text/xml; charset="utf-8"`)diff --git a/cmd/serve/dlna/dlna_test.go b/cmd/serve/dlna/dlna_test.goindex 0f5c59188..a2ef03445 100644--- a/cmd/serve/dlna/dlna_test.go+++ b/cmd/serve/dlna/dlna_test.go@@ -59,6 +59,8 @@ func TestRootSCPD(t *testing.T) {// Make sure that the SCPD contains a CDS service.require.Contains(t, string(body),"<serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>")+ // Ensure that the SCPD url is configured.+ require.Regexp(t, "<SCPDURL>/.*</SCPDURL>", string(body))}// Make sure that it serves content from the remote.