PDF Rendered Inside IFRAME by Post Request
Reported by
brunopas...@gmail.com,
Mar 6 2017
|
|||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Steps to reproduce the problem:
Execute the following steps to reproduce the issue.
1. Run apache server locally.
2. Use the files on the ZIP archive.
3. Access the file pdf_embedded.html on the browser
4. Click on the Submit button, to render the PDF on the first box by a POST request. At this moment everything is OK.
5. Click on the button 'Download' beside the 'Printer' on the first box. It will prompt a new window with the file name 'download.php', instead of 'Report.pdf' that was sent on the HEADER request(Content-disposition: inline; filename=Report.pdf).
6. Click on the button 'Download' beside the 'Printer' on the second box. It will happens the samething as the first box. The only difference is that in the first box is rendered by a FORM element using just HTML, for the second the form, is created dynamically on the javascript.
What is the expected behavior?
The name of the file that will be downloaded, should be 'Report.pdf'. Chrome, should use the option 'filename' provided on the HEADER request.
What went wrong?
When the PDF was rendered by a POST request, the name of the file was downloaded as 'download.php'.
Did this work before? N/A
Does this work in other browsers? N/A
Chrome version: 56.0.2924.87 Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 24.0 r0
When a PDF is rendered inside IFRAME by a POST Request, the button 'Download' beside the 'Printer' does not work as expected. In our case we generate a dynamic PDF for every request. To do that for each request we send some parameters to the server by a POST request, and the PDF is only generate if we receive this parameters on the server side by the POST Request, so, if a GET request is sent to the server nothing is returned. I've noticed that Chrome PDF Viewer plugin has a diferent behavior when it is embedded inside a IFRAME, it makes a new one request using the GET method when the 'Download' button is pressed. This is only happens inside a IFRAME, if you use it out from the IFRAME, it doesn't make another request, I believe that the chrome's plugin uses the same content that was previously returned on the first request.
* I've already found similar topics, but not related to IFRAME.
The following way is the samething, but it doesn't use the IFRAME, and works fine.
1. Run apache server locally.
2. Use the files on the ZIP archive.
3. Access the file pdf_normal.php on the browser. You will be redirected to download.php.
4. Click on the button 'Download' beside the 'Printer' on the first box, and the file name will be Report.pdf. This is the correctly
behavior.
,
Mar 7 2017
,
Mar 7 2018
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||
►
Sign in to add a comment |
|||
Comment 1 by brunopas...@gmail.com
, Mar 6 201771.4 KB
71.4 KB Download