• 1 reply
  • Latest Post - ‏2013-12-23T02:40:45Z by Smyle Z. Huang
22 Posts

Pinned topic Possibility of setting Content-type(Response Header)

‏2013-11-28T06:29:50Z |


I am trying to attach a PDF via a simple HREF link. I have the link as below

<a href="help/abc.pdf" target="_blank">Help</a>

When I debug(or open via preview mode), RUI Handler and hit on this link, I get the pdf with garbage values in a new tab. I found that the content-type in Response Header is shown as "text/html;charset=utf-8" instead of "application/pdf".

But, when I deploy the same RUI handle to HTML and run the HTML files, the pdf file displayed properly(with the help of browser plugin) along with the content-type as "application/pdf" in response header.

Would it be possible to set the content-type thru application for both debugger and deployed version? or is it wise to add the below parms in .htaccess files in IHS(if HTML;s are deployed separately   ?

<FilesMatch "\.pdf$">
ForceType applicaton/octet-stream
Header set Content-Disposition attachment

Kindly suggest.


Updated on 2013-11-28T06:30:52Z at 2013-11-28T06:30:52Z by navana
  • Smyle Z. Huang
    Smyle Z. Huang
    13 Posts

    Re: Possibility of setting Content-type(Response Header)


    Hi , I would suggest you to open a PMR, and let EGL team to decide if it is a defect which needs to be fixed.