IE7 + SSL + XML? = Flex “Error #2032: Stream Error”

I’m developing a Flex application that runs smoothly in Firefox over SSL. Today, I just wanted to verify whether Internet Explorer 7 (IE7) hosts the application as nicely. Somehow, I wasn’t surprised that the Microsoft browser invoked an “Error #2032: Stream Error”.

Don’t assume, test!

Searching brought me to judah’s blog, but the blog is only about URL paths. Because the application runs in Firefox and in non-SSL mode in IE7, this was not causing my problem. However, some comments on judad’s blog and on this blog were interesting: An Adobe TechNote warns of this issue. However, the note was last updated in 2005 what meant that it could not relate to IE7. I also found a Microsoft bug report describing the issue but it only links the bug to IE5 and below. The assumption that Microsoft has corrected this bug since 2005 was probably my biggest mistake in this hole story.

The search could go on. Barton has some nice input and proposes to tamper the HTTP header: remove Pragma and set Cache-Control: no-store. So I did and checked the HTTP headers in the SSL connection with Wireshark (which is also quite bogus for decrypting SSL packets, at least 1.0.0). This made the whole thing running. And in details:

Works:

  1. Cache-Control: no-store
  2. Cache-Control: no-store, must-revalidate
  3. Cache-Control: no-store,max-age=0,must-revalidate
  4. Cache-Control: max-age=0,must-revalidate
  5. Cache-Control: must-revalidate

Does not work:

    1. Pragma: no-cache <+whatever header like Cache-control: no-store>
    2. Cache-control: no-cache
    3. Cache-control: no-cache, must-revalidate
    4. Cache-control: no-cache,<+whatever>
    5. <empty = no Cache-control at all>

      Controlling Cache-Control

      In Firefox, you can check the content of the cache by entering about:cache in the URL. You will notice that Firefox caches all data coming from an SSL connection in memory. Hence, closing a tab does not delete the data but a restart of Firefox does.

      IE7 caches data coming from SSL normally to the disk. The HTTP header Cache-Control: no-store prevents this default behaviour. Unfortunately, I don’t know a similar command like about:cache in IE7, so haven’t investigated the exact caching behaviour. Cache stored on the disk can be checked with “Tools menu > Internet Options > General Tab > Browsing History section > Settings Button >View Files button” but I don’t know how to see the cache in the memory.


      5 Responses to “IE7 + SSL + XML? = Flex “Error #2032: Stream Error””

      1. zlatko Says:

        Emm …. in my case header “Pragma: no-cache” return form always server by default…How i can remove it ? Different calling header(… ;) from php doesnt help, i however see it in some alike Wireshark app.

      2. faindu Says:

        Hi Zlatko

        Last time I used php is about 8 years ago, so I can’t really help out with php. If you use mod_php or you do the encryption with an apache web server, you can modify headers there. Simply link in mod_headers an add ‘Header set Cache-Control “no-cache,must-revalidate”‘, ‘Header unset Pragma’ to the configuration.

      3. zlatko Says:

        Hi Faindu

        Got it !
        In php.ini leave empty value for key ’session.cache_limiter ‘, and ‘caching’ headers not sended.
        Thx ! ;)

      4. faindu Says:

        All right, thanks for the feedback.

      5. lessrain blog » Blog Archive » Flash: Nasty XML load bug in Internet Explorer Says:

        [...] Marc Speck [...]

      Leave a Reply