Webmock 3.1.0 changed the behavior to return `nil` for the body if an
HTTP 204 No Content response were received
(b837e64278).
Update the Bitbucket Server connection to ignore these No Content
response codes.
The importer would display a 500 error page if you attempted to import
using a non-existent DNS entry. This commit rescues known network issues
and consolidates them into
BitbucketServer::Connection::ConnectionError`. The previous error
handling in the paginator doesn't work because it returns a lazy
collection.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56154
In Ruby 2.4, `URI.join("http://test//", "a").to_s` will
remove the double slash, however it's not the case in
Ruby 2.5. Using chomp should work better for the intention,
as we're not trying to allow things like ../ or / paths
resolution.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53180