Fix case where port is missing
Merge pull request #7387 from owncloud/stable5-fixhostnamewithport

Fix case where port is missing