mdoubledragon
11-16-2009, 09:43 AM
Hi Guys,
My problem is not that something is not working. My problem is that something is working and I dont know why.
I am developing a flex app that fetches XML data from my servlet. I decided to use compression to reduce the message size and used deflate in the servlet. I also set the response content-type header to deflate.
On the flex side, I put in code to uncompress incoming data but kept getting exceptions. In a debugging session I found out that the incoming data (ResultEvent data) was coming as XML instead of binary which I expected.
I thought maybe my servlet deflate code is not correct, but running a test case using same code to save a file at local disk, I found out that it was indeed compressing data by more than 50%.
What I cannot figure out is if FlashPlayer reading the Deflate header and uncompressing incoming data before its populated in ResultEvent object or does FlashPlayer internally use browser request functionality and hence browser is uncompressing incoming data before sending it to FlashPlayer.
Doesn't make much sense asking this as long as things are working but I need to know whats happening here and if I have any dependency on the browser that I am using.
My problem is not that something is not working. My problem is that something is working and I dont know why.
I am developing a flex app that fetches XML data from my servlet. I decided to use compression to reduce the message size and used deflate in the servlet. I also set the response content-type header to deflate.
On the flex side, I put in code to uncompress incoming data but kept getting exceptions. In a debugging session I found out that the incoming data (ResultEvent data) was coming as XML instead of binary which I expected.
I thought maybe my servlet deflate code is not correct, but running a test case using same code to save a file at local disk, I found out that it was indeed compressing data by more than 50%.
What I cannot figure out is if FlashPlayer reading the Deflate header and uncompressing incoming data before its populated in ResultEvent object or does FlashPlayer internally use browser request functionality and hence browser is uncompressing incoming data before sending it to FlashPlayer.
Doesn't make much sense asking this as long as things are working but I need to know whats happening here and if I have any dependency on the browser that I am using.