Closed Bug 1391769 Opened 8 years ago Closed 8 years ago

Cannot POST a HTML <form> from moz-extension:// (WebExtensions)

Categories

(WebExtensions :: Untriaged, defect)

57 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1344465

People

(Reporter: miika9764, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 Build ID: 20170811100700 Steps to reproduce: - Start Firefox Nightly built from https://hg.mozilla.org/mozilla-central/rev/a6a1f5c1d971dbee67ba6eec7ead7902351ddca2 - Open about:debugging#addons - Load the extension built from https://github.com/siikamiika/Image-Reverse-Search-WebExtension/commit/8769a8eccef2152f0be5a2edf6074271f6ef4b64 (this is a fork trying to add POST requests to reverse image search engines but currently only sends a hello world request to httpbin.org/post; relevant code in the commit behind the link) - Right-click any image and select "Image Reverse Search" (Can also be reproduced by manually POSTing any <form> from a page behind moz-extension://.) Actual results: Nightly navigates to http://httpbin.org/post (GET /post) and you see "405 Method Not Allowed". Expected results: A POST request with "hello=world&lorem=ipsum" should be sent to http://httpbin.org/post and you should see something like this: (the addon works on Chromium) { "args": {}, "data": "", "files": {}, "form": { "hello": "world", "lorem": "ipsum" }, "headers": { "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Accept-Language": "en-US,en;q=0.8,fi;q=0.6", "Cache-Control": "max-age=0", "Connection": "close", "Content-Length": "23", "Content-Type": "application/x-www-form-urlencoded", "Host": "httpbin.org", "Origin": "null", "Upgrade-Insecure-Requests": "1", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" }, "json": null, "origin": "*.*.*.*", "url": "http://httpbin.org/post" }
Component: Untriaged → WebExtensions: Untriaged
Product: Firefox → Toolkit
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.