Set the request URL.
@param urlStr Request URL.
512425
public void setRequestUrl(String urlStr) {

		// This looks a little confusing: We're trying to fixup an incoming
		// request URL that starts with: 
		//       "http(s):/www.archive.org"
		// so it becomes:
		//       "http(s)://www.archive.org"
		// (note the missing second "/" in the first)
		// 
		// if that is not the case, then see if the incoming scheme
		// is known, adding an implied "http://" scheme if there doesn't appear
		// to be a scheme..
		// TODO: make the default "http://" configurable.
		if (!urlStr.startsWith(UrlOperations.HTTP_SCHEME) &&
				!urlStr.startsWith(UrlOperations.HTTPS_SCHEME) &&
				!urlStr.startsWith(UrlOperations.FTP_SCHEME) &&
				!urlStr.startsWith(UrlOperations.FTPS_SCHEME)) {
	    		if(urlStr.startsWith("http:/")) {
	    			urlStr = UrlOperations.HTTP_SCHEME + urlStr.substring(6);
	    		} else if(urlStr.startsWith("https:/")) {
				urlStr = UrlOperations.HTTPS_SCHEME + urlStr.substring(7);
			} else if(urlStr.startsWith("ftp:/")) {
				urlStr = UrlOperations.FTP_SCHEME + urlStr.substring(5);
			} else if(urlStr.startsWith("ftps:/")) {
				urlStr = UrlOperations.FTPS_SCHEME + urlStr.substring(6);
			} else {
	    		if(UrlOperations.urlToScheme(urlStr) == null) {
	    			urlStr = UrlOperations.HTTP_SCHEME + urlStr;
	    		}
	    	}
	    }

        try {
            String decodedUrlStr = URLDecoder.decode(urlStr, "UTF-8");

            String idnEncodedHost = UsableURIFactory.getInstance(decodedUrlStr, "UTF-8").getHost();
            
            if (idnEncodedHost != null) {
                // If url is absolute, replace host with IDN-encoded host.
                String unicodeEncodedHost = URLEncoder.encode(IDNA.toUnicode(idnEncodedHost), "UTF-8");
                urlStr = urlStr.replace(unicodeEncodedHost, idnEncodedHost);
            }
        } catch (UnsupportedEncodingException ex) {
            // Should never happen as UTF-8 is required to be present
            throw new RuntimeException(ex);
        } catch (URIException ex) {
            throw new RuntimeException(ex);
        }

        put(REQUEST_URL, urlStr);
	}
738172
static void dataUri( CssFormatter formatter, byte[] bytes, String urlStr, String type ) {
        if( type == null ) {
            switch( urlStr.substring( urlStr.lastIndexOf( '.' ) + 1 ) ) {
                case "gif": 
                    type = "image/gif;base64";
                    break;
                case "png": 
                    type = "image/png;base64";
                    break;
                case "jpg":
                case "jpeg":
                    type = "image/jpeg;base64";
                    break;
                default: 
                    type = "text/html";
            }
        } else {
            type = removeQuote( type );
        }

        if( type.endsWith( "base64" ) ) {
            formatter.append( "url(\"data:" ).append( type ).append( ',' );
            formatter.append( toBase64( bytes ) );
            formatter.append( "\")" );
        } else {
            formatter.append( "url(\"data:" ).append( type ).append( ',' );
            appendEncode( formatter, bytes );
            formatter.append( "\")" );
        }
    }
968082
public void setImageUrl(final String imageUrl) {
		ImageModel model = getOrCreateComponentModel();
		model.imageUrl = imageUrl;
		model.image = null;
	}
58718
def setUrl(self, url):
        
        if isUrl(url):
            self._url = url
        else:
            raise exceptions.BadUrlException(url)
        return self
921353
@Override
    public void addURLs(List<URL> urls)
    {
        for (URL url : urls) {
            addURL(url);
        }
    }
1008781
public void setSourceUrl(java.util.Collection<StringFilter> sourceUrl) {
        if (sourceUrl == null) {
            this.sourceUrl = null;
            return;
        }

        this.sourceUrl = new java.util.ArrayList<StringFilter>(sourceUrl);
    }
209798
def set_request_line(self, method, url, version):
        
        self.parsed_request = (method, url, version)
        self.request = {
            'method': method,
            'url': url,
            'version': version
        }
271783
public void setResponseURL(String responseURL) {
    String newURL = _substitutor.replace(responseURL);
    if (!_urlValidator.isValid(newURL)) {
      error("The RespondTo URL specified is invalid. Continuing with previous value.");
    } else {
      this._responseURL = newURL;
    }
  }
977052
public void addUrlMappings(String... urlMappings) {
		Assert.notNull(urlMappings, "UrlMappings must not be null");
		this.urlMappings.addAll(Arrays.asList(urlMappings));
	}
140491
@Override
    public void setRequestURI(byte[] uri) {

        if (null == uri || 0 == uri.length) {
            throw new IllegalArgumentException("setRequestURI: null input");
        }
        super.setFirstLineChanged();

        if ('*' == uri[0]) {
            // URI of "*" can only be one character long to be valid
            if (1 != uri.length && '?' != uri[1]) {
                String value = GenericUtils.getEnglishString(uri);
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "setRequestURI: invalid uri [" + value + "]");
                }
                throw new IllegalArgumentException("Invalid uri: " + value);
            }
        } else if ('/' != uri[0]) {
            String value = GenericUtils.getEnglishString(uri);
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "setRequestURI: invalid uri [" + value + "]");
            }
            throw new IllegalArgumentException("Invalid uri: " + value);
        }

        initScheme();
        this.myURIString = null;
        this.sUrlHost = null;
        this.iUrlPort = HeaderStorage.NOTSET;
        this.myQueryBytes = null;
        this.queryParams = null;
        parseURI(uri, 0);

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "setRequestURI: set URI to " + getRequestURI());
        }
    }
1233791
public void setUrl(String url) {
        this.url = url;
        
        if (clazz == null && url != null) {
            setClazz(ElementPlugin.class);
        }
    }
1004579
public void setUrls(java.util.Collection<String> urls) {
        if (urls == null) {
            this.urls = null;
            return;
        }

        this.urls = new java.util.ArrayList<String>(urls);
    }
990352
function getUrlForRouter(urlStr) {
        urlStr = urlStr || location.href;
        var uri = url.parse(urlStr);
        if (!globalConfig.useHash && supportHistoryPushState) {
            return uri.pathname.substr(globalConfig.urlRoot.length) + (uri.search || '');
        } else {
            return utils.getHash(urlStr);
        }
    }
1148453
public T url(String url) {
        if (view!=null) {
            if (view instanceof WebView) {
                ((WebView)view).loadUrl(url);
            }
            if (view instanceof TextView) {
                ((TextView)view).setAutoLinkMask(Linkify.ALL);
                text(url);
            }
        }
        return self();
    }
1144378
protected void setRequestUrl(MockServletRequest request,
			Map<String, String> variantMap, String path, JawrConfig config) {

		String domainURL = JawrConstant.HTTP_URL_PREFIX + DEFAULT_WEBAPP_URL;

		if (JawrConstant.SSL.equals(variantMap
				.get(JawrConstant.CONNECTION_TYPE_VARIANT_TYPE))) {
			// Use the contextPathSslOverride property if it's an absolute URL
			if (StringUtils.isNotEmpty(config.getContextPathSslOverride())
					&& config.getContextPathSslOverride().startsWith(
							JawrConstant.HTTPS_URL_PREFIX)) {
				domainURL = config.getContextPathSslOverride();
			} else {
				domainURL = JawrConstant.HTTPS_URL_PREFIX + DEFAULT_WEBAPP_URL;
			}
		} else {
			// Use the contextPathOverride property if it's an absolute URL
			if (StringUtils.isNotEmpty(config.getContextPathOverride())
					&& config.getContextPathOverride().startsWith(
							JawrConstant.HTTP_URL_PREFIX)) {
				domainURL = config.getContextPathOverride();
			} else {
				domainURL = JawrConstant.HTTP_URL_PREFIX + DEFAULT_WEBAPP_URL;
			}
		}

		request.setRequestUrl(PathNormalizer.joinDomainToPath(domainURL, path));
	}
758034
public static long getUriSize(String urlStr) {
        HttpURLConnection conn = null;
        try {
            URL url = new URL(urlStr);
            conn = (HttpURLConnection) url.openConnection();
            conn.setRequestMethod("HEAD");
            conn.getInputStream();
            return conn.getContentLengthLong();
        } catch (IOException e) {
            log.debug("Error", e);
            return -1;
        } finally {
            if (conn!=null) {
                conn.disconnect();
            }
        }
    }
1209997
public void setUrlMappings(Collection<String> urlMappings) {
		Assert.notNull(urlMappings, "UrlMappings must not be null");
		this.urlMappings = new LinkedHashSet<>(urlMappings);
	}