"Save Image As..." incorrect use of GET instead of POST method
Categories
(Firefox :: General, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox57 | --- | fix-optional |
People
(Reporter: saschanaz, Unassigned)
References
Details
Comment 2•7 years ago
|
||
Updated•7 years ago
|
Comment 3•7 years ago
|
||
Comment 4•7 years ago
|
||
We have the same problem on our internal website.
It has a form like
<form target="https://domain/path/to/download" method="post" target="_blank">
<input type="hidden" name="secret" value="***" />
<input type="hidden" name="id" value="123" />
<input type="submit" />
</form>
Page https://domain/path/to/download
returns Content-Disposition: inline, filename="123.jpg"
header. But it returns error message instead of file for missing id or secret parameter.
When user press Ctrl+S, it works correctly. But "Save image as..." leads to sending GET request without parameters. Also, "Send image by email..." leads to opening the outlook with https://domain/path/to/download link. Seems like this menu items are broken for images loaded via POST requests.
The fundamental problem here is that POST requests are not idempotent, so it's incorrect to send repeated request. The only valid way to save image loaded by POST is getting it from cache (like Save as... works)..
Updated•2 years ago
|
Description
•