@Override
    public DescriptiveUrlBag toUrl(final Path file) {
        final DescriptiveUrlBag list = new DescriptiveUrlBag();
        final DescriptiveUrl base = new DefaultWebUrlProvider().toUrl(host);
        list.add(new DescriptiveUrl(URI.create(String.format("%s%s", base.getUrl(), URIEncoder.encode(
                PathNormalizer.normalize(PathRelativizer.relativize(PathNormalizer.normalize(host.getDefaultPath(), true), file.getAbsolute()))
            ))).normalize(),
                base.getType(),
                base.getHelp())
        );
        return list;
    }
@Test
    public void testHttps() {
        final Host host = new Host(new TestProtocol(Scheme.https), "test.cyberduck.ch");
        assertEquals("https://test.cyberduck.ch/", new DefaultWebUrlProvider().toUrl(host).getUrl());
        assertEquals("https://test.cyberduck.ch/my/documentroot/f",
            new HostWebUrlProvider(host).toUrl(new Path("/my/documentroot/f", EnumSet.of(Path.Type.directory))).find(DescriptiveUrl.Type.http).getUrl());
    }