String contentType = req.getContentType(); // get the incoming type
if (contentType == null) return; // nothing incoming, nothing to do
res.setContentType(contentType); // set outgoing type to be incoming type
PrintWriter out = res.getWriter();
BufferedReader in = req.getReader();
try {
String line = null;
while ((line = in.readLine()) != null) {
if (perl.match("#</?blink>#i", line))
line = perl.substitute("s#</?blink>##ig", line);
out.println(line);
}
}
catch(MalformedPerl5PatternException e) { // only thrown during development
log("Problem compiling a regular expression: " + e.getMessage());
}