Fix KD Handling of HTML Docs

In ALUI 6.5, and following through to 10gR3 and the latest patches, Oracle changed the way documents are opened in the Knowledge Directory.  This change was to get a little better browser compatibility so that when a user clicks on a document in the KD, the user is always presented with the usual Open/Save Dialog box.

Many WCI clients have HTML files in their Knowledge Directories, whether they’re crawled in from Publisher, Collaboration Server, or uploaded from some other source.  In version 6.1 and before, the behavior of the portal was simply to open these files directly in the browser, but that changed with 6.5.  Unfortunately, Oracle has asserted that this is “expected behavior” and while an enhancement request has been submitted, there are no promises about the behavior changing in 11g. The good news is that there’s a relatively simple fix for this behavior.  Unfortunately, the “relatively simple” fix assumes you’ve got BigIP load balancing requests to your portal, but if not, hopefully this post will give you some ideas on how to resolve the problem in your environment.

The problem is caused by the portal returning an HTTP header called “Content-Disposition”:

Content Disposition Header
Content Disposition Header

The trick is to remove this header for HTML documents.  I’ve tried writing ISAPI filters unsuccessfully, but for the clients that needed the fix, they had BigIP. 

Hit the link to see the BigIP iRule to resolve this issue.

if { [HTTP::header Content-Disposition] contains "attachment"}
    if { [HTTP::header Content-Type] contains "text/html" }
        HTTP::header remove "Content-Disposition"


This iRule simply says “if there’s a Content-Disposition Header, and the Content Type is HTML, remove that header”.

Tags: , ,

2 Responses to “Fix KD Handling of HTML Docs”

  1. Joel Collins says:

    Its ridiculous that this is still an issue. Oracle hasn’t released a patch yet? Surely a customer has complained loudly enough by now.

  2. Matt Chiste says:

    Oracle doesn’t consider this a bug; when I reported it, the response was: “This is not a bug within the release, it was designed to work this way because of the changes made in the latest releases of the browsers, specifically IE7 and FF 3. The browsers actually have this functionality by default and that is why it works this way within our application.”

    Oracle (for obvious reasons) places more emphasis on “bugs” when they are coming from clients rather than consultants. So, if you think this is a bug, I’d encourage you to report this to Oracle as such – there’s “strength in numbers”!

Leave a Reply