From: <php...@li...> - 2010-12-20 08:11:46
|
Hei I have discovered a "bug" in the addHeader method of FastCGIServlet. It wrongly asumes that the string it gets after stripping off "Status:" is a number. I am using it with Joomla and the string that is used in the line response.setStatus(Integer.parseInt(line)); contains "403:" - This means that the above line will throw a NumberFormatException. Below is a suggested fix for cleaning up the "line" prior to setting the status. while(!line.matches("^\\d*$") && line.length()>0) { line=line.substr(0,line.length-1); } if(line.length()>0) { response.setStatus(Integer.parseInt(line)); } else { //Could not deduce a number - asume 200 Ok response.setStatus(200); } Regards Hermod * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the anti virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |