/src/main/java/org/htmlunit/util/FalsifyingWebConnection.java
resp.getWebRequest( ).setUrl( originalUrl) ; final WebResponse resp = super.getResponse( webRequest) ;webRequest.setUrl( url) ;
webRequest.setUrl ( url ) ; final WebResponse resp = super.getResponse ( webRequest ) ; resp.getWebRequest ( ) .setUrl ( originalUrl ) ;
public FalsifyingWebConnection(final WebClient webClient) throws IllegalArgumentException { super(webClient); } protected WebResponse deliverFromAlternateUrl(final WebRequest webRequest, final URL url) throws IOException { final URL originalUrl = webRequest.getUrl(); <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());