Opened 9 years ago
Last modified 4 years ago
#15863 new defect
dojo/request/iframe not working as expected with response header: 'Content-Disposition: attachment'
Reported by: | burrito__ | Owned by: | Bryan Forbes |
---|---|---|---|
Priority: | low | Milestone: | 1.15 |
Component: | IO | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
When making a post request with dojo/request/iframe to a web service which returns Content-disposition: attachment in the header, the following behaviour is observed
1) request is made to the server and the browser interprets the response as a file download 2) The returned promise from the post() function is never completed. 3) subsequent post() requests made via iframe are not executed.
Test case and php script attached.
Attachments (3)
Change History (7)
Changed 9 years ago by
Attachment: | csvecho.php added |
---|
Changed 9 years ago by
Attachment: | TestCase_workaround.html added |
---|
workaround for the same use case using dijit/form/Form
comment:2 Changed 7 years ago by
Milestone: | tbd → 1.11 |
---|---|
Priority: | undecided → low |
This is a tricky one. When the server returns Content-Disposition: attachment
, the iframe's load
event will not fire in Chrome, Safari, or Firefox 3.5+. In addition, the iframe cannot be reused. There are a couple of work-arounds which I'll try to explore, but it looks like the best way will be to require users to have their server set a cookie which we'll have to periodically check.
comment:3 Changed 5 years ago by
Milestone: | 1.11 → 1.12 |
---|
comment:4 Changed 4 years ago by
Milestone: | 1.13 → 1.15 |
---|
Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.
php script for creating csv file download