Browser Plugin Send Multiple Requests Causing Security Issue When Downloading PDF Files
Copy link to clipboard
Copied
I am working on a web application with Tomcat as backend server and browser with Java script as front. We notice the brwoser will send multiple HTTP requests, fm some PDF plug-in, when user trying to download a single PDF file. Our application server will create a sessson/download ticket for each PDF download. The ticket can be used only once for security purpose, the additional HTTP request from plug-in break our system to cause client fail to receive PDF file.
Is ther any way the plug-in or browser can be configured to avoid sending the second request?
Thanks - Gordon
Copy link to clipboard
Copied
Fix it in the server. If you can't accept multiple requests turn off byte-range serving, which invites the client to do this.
Copy link to clipboard
Copied
Well this is a bad answer. Since I am controlling the data flow from my script I added a header with any PDF request response:
Accept-Ranges: none
Which had no descernable affect on the plugins dual request action.
What I personally do not understand is that if the initial reqest is just to get the meta information like file size, why not set the the inital request method to HEAD so that the fishing request can be differentiated from the the actual download request?

