I've got a Java servlet program that receives a zip file and then extract it to a location on the server to replace some templating files of a website (HTML, PNG, etc). Now, one of my colleagues wants to try using it with PHP, but then we encountered quite a peculiar problem with this combination.
At first, I always got NullPointerException
on the HttpRequest.getParameter
function on Java, even though I did send the files via php_curl
to the servlet. the strange thing is, if I send the same file via Ruby, Python, or any other method (HTML, for example) it works well with no error generated.
After a lot of tinkering around, i've found that php will successfully send the zip file to java servlet only after i've removed some file inside it, the files which are causing this issue turns out to be the fonts which consist of .woff
, .eot
, .svg
, and .ttf
.
Is there any workaround for this issue other than removing the font file from my zip file?
configuration : PHP 5.6 using guzzle and other curl library Java 1.7, Java EE 7, servlet api 3.1, running on WildFly 8.2 server