Only bother reading this if you do anything with Flex, Domino and XML. Otherwise it will be a waste of your time.
So, I'd written a Flex app that fetched XML from a Domino-based view, which used a $$ViewTemplate form. This form used a WebQueryOpen agent to add some additional XML to the bottom of the form, alongside the view data itself.
The app worked as a non-SSL version in all browsers and I assumed it was ready for production. However, when I moved it to a live environment which used HTTPS it only worked in non-IE browsers. In IE 7/8 it returned a "HTTP request error".
Looking at the headers of the HTTP request the server returns the right content-length but returned no content. No errors in the Domino log. No nothing. No clues at all.
Opening the URL for the XML directly in IE using SSL worked fine.
If I removed the WQO agent from the $$ViewTemplate form then it worked fine. But as as soon as I put the agent back in there (even just an empty agent would cause it to fail). Although, leaving the agent in doesn't affect any other browser. ODD.
So, why on earth does having a WQO agent cause the server output to die when requested from within Flex if its IE but work if the URL is requested directly or requested from within Flex in any other browser?
Turns out it's because adding a WQO agent causes Domino to add a Pragma:no-cache header and there's a nasty XML-loading bug in IE (Adobe's Technote on it). Looks like it's not a Domino bug after all. Shame on me for assuming it was.
To solve this I added a hidden computed for display field to top of the $$ViewTemplate form called "HTTPHeader" and added the following to it:
Don't worry though, you can still prevent Flex from using the cached version by adding the following to the code which requests the URL:
Part of the beauty of Flex is that you shouldn't need to check a site in any more than one browser before daring to show an IE-using customer. In this case that notion didn't ring true and was a handy reminder that my test environment should always closely mimic the one in which it's going to be used.