Expands a relative URL relative to the specified base. In most situations this is the same as new URL(baseUrl, relativeUrl) but there are some cases that URL doesn't handle correctly. See RFC1808 regarding Relative Uniform Resource Loc
(final URL baseUrl, final String relativeUrl)
| 1356 | * @throws MalformedURLException if an error occurred when creating a URL object |
| 1357 | */ |
| 1358 | public static URL expandUrl(final URL baseUrl, final String relativeUrl) throws MalformedURLException { |
| 1359 | final String newUrl = UrlUtils.resolveUrl(baseUrl, relativeUrl); |
| 1360 | return UrlUtils.toUrlUnsafe(newUrl); |
| 1361 | } |
| 1362 | |
| 1363 | private WebResponse makeWebResponseForDataUrl(final WebRequest webRequest) throws IOException { |
| 1364 | final URL url = webRequest.getUrl(); |