docs: public static URL resolve(URL base, String relUrl) throws MalformedURLException {
          // workaround: java resolves '//path/file + ?foo' to '//path/?foo', not '//path/file?foo' as desired
          if (relUrl.startsWith("?"))
              relUrl = base.getPath() + relUrl;
          // workaround: //example.com + ./foo = //example.com/./foo, not //example.com/foo
          if (relUrl.indexOf('.') == 0 && base.getFile().indexOf('/') != 0) {
              base = new URL(base.getProtocol(), base.getHost(), base.getPort(), "/" + base.getFile());
          }
          return new URL(base, relUrl);
      }