Skip to content

Commit d3b7ab9

Browse files
committed
simplify code (the parameter was something used during the IE times)
1 parent 1acdeac commit d3b7ab9

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

src/main/java/org/htmlunit/WebClient.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -2602,13 +2602,12 @@ public boolean isOutdated() {
26022602
* @param target the name of the target window
26032603
* @param request the request to perform
26042604
* @param checkHash if true check for hashChenage
2605-
* @param forceLoad if true always load the request even if there is already the same in the queue
26062605
* @param forceAttachmentWithFilename if not {@code null} the AttachmentHandler isAttachment() method is not called,
26072606
* the response has to be handled as attachment in any case
26082607
* @param description information about the origin of the request. Useful for debugging.
26092608
*/
26102609
public void download(final WebWindow requestingWindow, final String target,
2611-
final WebRequest request, final boolean checkHash, final boolean forceLoad,
2610+
final WebRequest request, final boolean checkHash,
26122611
final String forceAttachmentWithFilename, final String description) {
26132612

26142613
final WebWindow targetWindow = resolveWindow(requestingWindow, target);
@@ -2645,9 +2644,7 @@ public void download(final WebWindow requestingWindow, final String target,
26452644
final WebRequest otherRequest = otherLoadJob.request_;
26462645
final URL otherUrl = otherRequest.getUrl();
26472646

2648-
// TODO: investigate but it seems that IE considers query string too but not FF
2649-
if (!forceLoad
2650-
&& url.getPath().equals(otherUrl.getPath()) // fail fast
2647+
if (url.getPath().equals(otherUrl.getPath()) // fail fast
26512648
&& url.toString().equals(otherUrl.toString())
26522649
&& request.getRequestParameters().equals(otherRequest.getRequestParameters())
26532650
&& Objects.equals(request.getRequestBody(), otherRequest.getRequestBody())) {

src/main/java/org/htmlunit/html/HtmlAnchor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ protected void doClickStateUpdate(final boolean shiftKey, final boolean ctrlKey,
195195
target = page.getResolvedTarget(getTargetAttribute());
196196
}
197197
page.getWebClient().download(page.getEnclosingWindow(), target, webRequest,
198-
true, false, (ATTRIBUTE_NOT_DEFINED != downloadAttribute) ? downloadAttribute : null, "Link click");
198+
true, (ATTRIBUTE_NOT_DEFINED != downloadAttribute) ? downloadAttribute : null, "Link click");
199199
}
200200

201201
private boolean relContainsNoreferrer() {

src/main/java/org/htmlunit/html/HtmlForm.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ && getAttributeDirect(ATTRIBUTE_NOVALIDATE) != ATTRIBUTE_NOT_DEFINED) {
191191

192192
final WebWindow webWindow = htmlPage.getEnclosingWindow();
193193
// Calling form.submit() twice forces double download.
194-
webClient.download(webWindow, target, request, false, false, null, "JS form.submit()");
194+
webClient.download(webWindow, target, request, false, null, "JS form.submit()");
195195
}
196196

197197
/**

src/main/java/org/htmlunit/javascript/host/Location.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public void reload(final boolean force) throws IOException {
229229
request.setRefererHeader(htmlPage.getUrl());
230230
}
231231

232-
webWindow.getWebClient().download(webWindow, "", request, false, false, null, "JS location.reload");
232+
webWindow.getWebClient().download(webWindow, "", request, false, null, "JS location.reload");
233233
}
234234

235235
/**
@@ -315,7 +315,7 @@ public void setHref(final String newLocation) throws IOException {
315315
request.setRefererHeader(page.getUrl());
316316

317317
webWindow = window_.getWebWindow();
318-
webWindow.getWebClient().download(webWindow, "", request, true, false, null, "JS set location");
318+
webWindow.getWebClient().download(webWindow, "", request, true, null, "JS set location");
319319
}
320320
catch (final MalformedURLException e) {
321321
if (LOG.isErrorEnabled()) {

0 commit comments

Comments
 (0)