MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / getUrlWithoutRef

Method getUrlWithoutRef

src/main/java/org/htmlunit/util/UrlUtils.java:432–434  ·  view source on GitHub ↗

Creates and returns a new URL using only the protocol, authority and path from the given one. @param u the URL on which to base the returned URL @return a new URL using only the protocol and authority from the given one @throws MalformedURLException if there is a problem creating the new URL

(final URL u)

Source from the content-addressed store, hash-verified

430 * @throws MalformedURLException if there is a problem creating the new URL
431 */
432 public static URL getUrlWithoutRef(final URL u) throws MalformedURLException {
433 return createNewUrl(u.getProtocol(), u.getAuthority(), u.getPath(), null, u.getQuery());
434 }
435
436 /**
437 * Creates and returns a new URL identical to the specified URL, except using the specified protocol.

Callers 1

setRefererHeaderMethod · 0.95

Calls 3

createNewUrlMethod · 0.95
getProtocolMethod · 0.45
getPathMethod · 0.45

Tested by

no test coverage detected