Branch and tag can`t able to delete by API

Issue:

After upgrading the GitLab to 10.3.5 from 9.3.6 the branch and tag deleting API is not working if it contains / in the name (example release/branch). But it worked older version.

C:\Users\test>curl.exe --request DELETE --header "PRIVATE-TOKEN:token" "https://gitlab.company.com/api/v4/projects/1582/repository/branches/test/test"
{"error":"404 Not Found"}
C:\Users\test>curl.exe --request DELETE --header "PRIVATE-TOKEN:token" "https://gitlab.company.com/api/v4/projects/1582/repository/branches/testz"
C:\Users\test>curl.exe --request DELETE --header "PRIVATE-TOKEN:token" "https://gitlab.company.com/api/v4/projects/1582/repository/tags/tag/test"
{"error":"404 Not Found"}
C:\Users\test>curl.exe --request DELETE --header "PRIVATE-TOKEN:token" "https://gitlab.company.com/api/v4/projects/1582/repository/tags/tagtest"

In above curl data, I can able to delete the branch testz but test/test throw the error Same in tag also. How to delete these kinda branches by API?