[Webkit-unassigned] [Bug 202963] New: Wrong HTTP method (POST instead of GET) when reload a page after pushState if previous page was loaded by a POST

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 14 18:29:32 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=202963

            Bug ID: 202963
           Summary: Wrong HTTP method (POST instead of GET) when reload a
                    page after pushState if previous page was loaded by a
                    POST
           Product: WebKit
           Version: Safari 13
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: History
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: huocp at me.com

Created attachment 380942

  --> https://bugs.webkit.org/attachment.cgi?id=380942&action=review

a nodejs script to run a local http server on port 8000

To reproduce:

1. use attached nodejs file index.js, run `node index.js`.
2. use Safari to visit http://localhost:8000/
3. click "try" button in the page, it submits a POST form, renders a new page http://localhost:8000/do,
4. now open dev inspector, goto console, run `history.pushState({}, "", "/whatever");`, the browser window now shows latest url "/whatever".
5. use browser window reload button to reload current page.
6. safari should ask you "Are you sure you want to send a form again?", click send.
7. in dev inspector, goto network tab, double check the request to "/whatever", it's a POST request.

This bug was first reported in 2017, so it's likely affecting multiple Safari/webkit versions, not only latest Safari 13.
This wrong behaviour does not affect Chrome and Firefox.

https://stackoverflow.com/questions/46933389/safari-send-post-request-when-refresh-after-pushstate-replacestate
https://github.com/aurelia/history-browser/issues/34#issuecomment-540926059

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191015/b03aa72e/attachment-0001.html>


More information about the webkit-unassigned mailing list