This is a take over from a community contribution:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20990
Skip TeamCity push event when related to branch delete
Support merge request events for TeamCity service.
Add checkbox for merge request triggers in the TeamCity
configuration page.
Gitlab::HTTP now resolves the hostname only once, verifies the IP is not
blocked, and then uses the same IP to perform the actual request, while
passing the original hostname in the `Host` header and SSL SNI field.
If one had configured a `teamcity_url` like http://foo.bar/teamcity in
the previous implementation the plugin directed it's request i.e. to
http://foo.bar/httpAuth/... instead of http://foo.bar/teamcity/httpAuth/...
`URI.join` only works correctly, if the prefix URL has
- at least one or more trailing '/'
- the appended parts are _not_ prefixed with '/'
The current implementation should work with all sorts of TeamCity base
URLs.
Signed-off-by: Rémy Coutable <remy@rymai.me>