We have written a servlet that allows user to download a .csv file from author. The servlet code is adding a response header "Content-Disposition" : "attachment".
When the servlet get request is submitted to author we are able to see the response header -- "Content-Disposition" : "attachment" on the browser.
We have configured a dispatcher in front of author. When the same request is sent to via dispatcher, the response header "Content-Disposition" : "attachment" is getting removed. We confirmed the missing header by verifying the response headers on browser.
The missing response header is causing the downloaded file not to have any extension. Hence user is unable to open the .csv file on his machine as the extension is missing
Am I missing something in dispatcher configuration to allow this response header?
are you sure that you are not seeing a cached response from dispatcher? if it is being cached then unless you configure dispatcher to cache headers also see Configuring Dispatcher "Caching HTTP Response Headers"
Also, just "Content-Disposition" : "attachment, does not set the filename. In the absence of filename in header, it will probably guess it from the url.