Fix case where port is missing
Merge pull request #7386 from owncloud/stable6-fixhostnamewithport

Fix case where port is missing