Skip to content

Commit

Permalink
Redirect POST requests using .py resource
Browse files Browse the repository at this point in the history
Part of #11269.

Also see #11343.
  • Loading branch information
dhdavvie authored and zcorpan committed Jun 5, 2018
1 parent 8b089cb commit ec9ffb1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
10 changes: 0 additions & 10 deletions html/browsers/history/the-location-interface/reload_post_1-1.html

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
var win = window.open("reload_post_1-1.html");
var win = window.open("resources/reload_post_1-1.py");
var t = async_test();
var posted = false;
var reloaded = false;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
def main(request, response):
headers = [("Content-Type", "text/html")]
return headers, '''
<script>
onload = function() {opener.next()}
document.write(Math.random());
</script>
<form method="POST" action="">
<input type=hidden name=test value=test>
<input type=submit>
</form>
<button onclick="location.reload()">Reload</button>
'''

0 comments on commit ec9ffb1

Please sign in to comment.