Opened 7 years ago

Last modified 2 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)

csvecho.php (299 bytes) - added by burrito__ 7 years ago.
php script for creating csv file download
TestCase.html (3.3 KB) - added by burrito__ 7 years ago.
Test case for iframe behavior
TestCase_workaround.html (3.8 KB) - added by burrito__ 7 years ago.
workaround for the same use case using dijit/form/Form

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by burrito__

Attachment: csvecho.php added

php script for creating csv file download

Changed 7 years ago by burrito__

Attachment: TestCase.html added

Test case for iframe behavior

Changed 7 years ago by burrito__

Attachment: TestCase_workaround.html added

workaround for the same use case using dijit/form/Form

comment:1 Changed 5 years ago by cjolif

some of our internal users are facing that one as well.

comment:2 Changed 5 years ago by Bryan Forbes

Milestone: tbd1.11
Priority: undecidedlow

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 3 years ago by dylan

Milestone: 1.111.12

comment:4 Changed 2 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.