Form method "post" on local file results in Firefox sending GET
Categories
(Core :: DOM: Forms, defect)
Tracking
()
People
(Reporter: Hi-Angel, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/6.7.2 Chrome/118.0.5993.220 Safari/537.36
Steps to reproduce:
When form tag has set method="post", Firefox ignores it and sends GET instead. I tested the same code I use below here https://onecompiler.com/html/42snaucbm and there pressing the button results in an error showing POST, i.e. it works as expected.
- Open HTML file that looks as follows:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>title</title>
</head>
<body>
<form action="tip.php" method="post">
<input type="submit" value="Test">
</form>
</body>
</html>
- Press F12 to open debugging tools and click "Network tab"
- Press
Testbutton
Actual results:
The "Network" tab shows GET getting sent
Expected results:
The "Network" tab should've showed POST being sent
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Networking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
So, I found out that it seems FF only has this problem when a POST would get sent to what looks like a local file. To be more specific, if in the test above you replace tip.php with http://localhost:8090/tip.php, a POST will get sent as expected.
I'm pretty sure it needs to be fixed somehow though, because I just spent multiple hours trying different options and browsers, and searching for a way to get POST triggered.
Comment 3•2 years ago
|
||
Moving this to HTML for initial peek investigation as to why form action is not parsed correctly.
Kindly revert to networking if you see that the request is processed correctly.
Please note that if the request method is not populated in the channel, necko adds a default GET method.
Updated•2 years ago
|
Description
•