Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with Back/Forward/Reload on POST requests #138

Open
GoogleCodeExporter opened this issue Aug 28, 2015 · 1 comment
Open

Issues with Back/Forward/Reload on POST requests #138

GoogleCodeExporter opened this issue Aug 28, 2015 · 1 comment
Labels

Comments

@GoogleCodeExporter
Copy link

GoogleCodeExporter commented Aug 28, 2015

Upstream CEF issue:
https://bitbucket.org/chromiumembedded/cef/issues/1420/issues-with-back-forward-reload-on-post

Issue reported on CEF Forum:
http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=12238

During testing of POST requests for pretty urls, a new bug was found. When doing a post request to a non-pretty url, and later navigation Back and Forward in history using mouse context menu, an error occurs:

  Loading error (-400).

The message above is outputted in ClientHandler::OnLoadError().

The meaning of -400 error in Chromium:

  // The cache does not have the requested entry.
  NET_ERROR(CACHE_MISS, -400)

There seem to be two solutions
a) Find a way to resent the POST request
b) Handle -400 error by navigating Back in history. Unfortunately it makes any Forward navigation not possible if there was a POST request made at some point.

Solution b) does not work. The steps are:

  1. GET index.php
  2. GET pretty-urls.php
  3. POST pretty-urls.php
  4. Back() to GET pretty-urls.php
  5. Forward() to POST pretty-urls.php - this Back() in OnLoadError and causes a redirect to 1) GET index.php

Step 5) should cause stepping back to step 2) to GET pretty-urls.php. Maybe it should be browser->Reload() called in step 5 instead of Back()?

By doing Reload() in step 5) it is step 3) POST that is repeated. And step 2) completely disappears from navigation history. Going Back() after step 5) takes back to step 1) GET index.php. Now, doing a forward makes it to step 3). Step 2) is lost.

Partially fixed in revision 5a4ac25. There are still problems as some of the entries in navigation history are lost. It gets rid of the "-400 Loading error" being displayed to user. And POST request is resent properly when navigating in history.

Original issue reported on code.google.com by czarek.t...@gmail.com on 28 Oct 2014 at 9:43

@cztomczak
Copy link
Owner

Can someone test if this is still an issue with latest v57?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants