I am trying to build a xpi file using Java servlet. If I return the xpi as a zip using the following code in the servlet -
response.setContentType("application/zip");
response.setHeader("Content-Disposition","inline;filename=xpitest.xpi;");
Everything works fine with above code. I can save the file to the filesystem and install it.
However, if I try to return the file with the following header and contenttype -
response.setContentType("application/x-xpinstall");
response.setHeader("Content-Disposition","filename=xpitest.xpi;");
On the client side, firefox recognizes that the file is an xpi package and shows the Install option. But, when I try to install it, I get this error - "Not a valid install package - 207"
Can someone suggest what I need to use for setContentType() and setHeader()?
Thanks.