outputBuffer.sendStatus();
int size = headers.size();
for (int i = 0; i < size; i++) {
outputBuffer.sendHeader(headers.getName(i), headers.getValue(i));
}
outputBuffer.endHeaders();
try {
/**Browsers are not happy with the status alone, need to send
* some html message so that it can be displayed to user.
* Improvement could be to read the error message from a configured
* error file. TODO see how we can combine this method &