I’ve created a servlet that changes the binaries of a SWF file and output it to the user. The SWF is compressed by ZLIB by default. Then I inflate, change the binaries, deflate and output the result.
Everything was running right on a Windows Server 2008 (also in 2003). Currently, we need change the server to Linux, and then, this servlet is somehow outputing a corrupted SWF File… what could be the problem? What intrigues me more is that there is no difference between the Windows and Linux servlet versions.
Is there any undocumented linux specific behaviour for the java.util.zip package?
My Windows Server is (where the servlet is working):
- Windows Server 2008 (6.0 – x86)
- Apache 2.2.11
- Tomcat 6.0.16.0 Java
- JDK 1.6.0_12-b04
My CentOS Server is (where te servlet doesn’t work)
- CentOS 5.4 (2.6.18-164.15.1.el5 – i386)
- Apache 2.2.3
- Tomcat 6.0.16.0
- Java JDK 1.6.0_12-b04
Any lead would be appreciated!
Cheers,
CaioToOn!
It’s difficult to say more without seeing some code and/or examples of how your SWF files are being “corrupted”. To answer your question directly, I can’t think of any difference in principle between the zip library on the two platforms. But some things to think about: