/src/main/java/org/htmlunit/util/FalsifyingWebConnection.java
resp.getContentCharset( ) .setUrl( originalUrl) ;
resp.getWebRequest ( ) .setUrl ( originalUrl ) ;
} protected WebResponse deliverFromAlternateUrl(final WebRequest webRequest, final URL url) throws IOException { final URL originalUrl = webRequest.getUrl(); webRequest.setUrl(url); final WebResponse resp = super.getResponse(webRequest); <extra_id_0> return resp; } protected WebResponse replaceContent(final WebResponse wr, final String newContent) throws IOException { final byte[] body = newContent.getBytes(wr.getContentCharset()); final WebResponseData wrd = new WebResponseData(body, wr.getStatusCode(), wr.getStatusMessage(), wr.getResponseHeaders());