Unescape branch param to delete
Branch names that contain `/` return a 405 error when being deleted because the slash is escaped to `%2F` This patch will unescape the param prior to executing the delete action.
This commit is contained in:
parent
c3c9703437
commit
862e1e6f17
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
require 'mime/types'
|
||||
require 'uri'
|
||||
|
||||
module API
|
||||
# Projects API
|
||||
|
@ -103,7 +104,7 @@ module API
|
|||
delete ":id/repository/branches/:branch" do
|
||||
authorize_push_project
|
||||
result = DeleteBranchService.new(user_project, current_user).
|
||||
execute(params[:branch])
|
||||
execute(URI.unescape(params[:branch]))
|
||||
|
||||
if result[:status] == :success
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue