Menu

#1840 JS Location.reload() changes POST to GET and drops formdata

Latest SVN
closed
RBRi
None
1
2017-12-01
2016-11-30
No

The implementation for Location.reload() is turning it into a Location.setHref(Location.getHref()), which naturally means every page gets reloaded as a GET request, making it an entirely different request.

Possible fix

The following isn't much thought out, but seems to fix POST loaded pages:

public void reload(final boolean force) throws IOException {
    final Page page = window_.getWebWindow().getEnclosedPage();
    final WebRequest request = page.getWebResponse().getWebRequest();
    final WebWindow webWindow = window_.getWebWindow();
    webWindow.getWebClient().download(webWindow, "", request, true, false, "JS location.reload()");
}

Discussion

  • RBRi

    RBRi - 2017-12-01
    • status: open --> closed
    • assigned_to: RBRi
     
  • RBRi

    RBRi - 2017-12-01

    Now fixed in SVN. Thanks for your report and sorry for the long delay before fixing this

     

Log in to post a comment.