Don't alter query string when submitting form by POST.

This commit is contained in:
Josh Matthews 2018-12-03 01:45:58 -05:00
parent 27c25116d3
commit 1c7cfafcc5
4 changed files with 8 additions and 5 deletions

View file

@ -6,5 +6,7 @@ def main(request, response):
else:
result = request.POST.first('foo') == 'bar'
result = result and request.url_parts.query == 'query=1'
return ([("Content-Type", "text/plain")],
"OK" if result else "FAIL")

View file

@ -96,7 +96,7 @@ function run_simple_test() {
var testframe = document.getElementById("testframe");
var testdocument = testframe.contentWindow.document;
testdocument.body.innerHTML =
"<form id=testform method=post action=\"form-submission.py\" enctype=\"" + test_obj.enctype + "\">" +
"<form id=testform method=post action=\"form-submission.py?query=1\" enctype=\"" + test_obj.enctype + "\">" +
test_obj.input +
test_obj.submitelement +
"</form>";