Archived
1
0

Remove extra / in Metadata request

This fixes the issuing of a request with a doubled slash in the URL.
This causes Dropbox to issue a 301 redirect to the URL without the
`//` which causes an extra HTTP transaction.
This commit is contained in:
Nick Craig-Wood 2016-04-24 11:06:30 +01:00
parent b7d75fe255
commit fe9596bfbb

View File

@ -832,6 +832,7 @@ func (db *Dropbox) Metadata(src string, list bool, includeDeleted bool, hash, re
params.Set("hash", hash)
}
src = strings.Trim(src, "/")
act := strings.Join([]string{"metadata", db.RootDirectory, src}, "/")
err := db.doRequest("GET", act, params, &rv)
return &rv, err