This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
Resource deletion operations fail because of double slash in REST API URL #639
Labels
Milestone
There is a bug in
MsRest::HTTPOperationRequest
which causesAzure::ARM::Resources::Resources#delete_by_id
(and presumably some other methods) to fail with a somewhat obscure stack trace.To reproduce, create a new resource group named
test
, within it create a new network interface calledtest
, and then try to use the script below to destroy it. The result should be similar to the stack trace above.The bug is caused by handing a relative path starting with two slashes to
URI.parse
, which will then interpret the first segment as a host name.MsRest::HTTPOperationRequest#build_path
tries to remove redundant slashes using a regexp, but the regexp fails to take into account the case where the double slash occurs at the very beginning of the path, as is the case with paths generated during adelete_by_id
operation.A 3 character monkey patch will follow in the form of a pull request shortly.
The text was updated successfully, but these errors were encountered: