def handle(self, sock, read_data, path, headers):
if "<STR_LIT>" not in self.redirect_to:<EOL><INDENT>destination = "<STR_LIT>" % (<EOL>"<STR_LIT:s>" if headers.get('<STR_LIT>', headers.get('<STR_LIT>', "<STR_LIT>")).lower() in ("<STR_LIT>", "<STR_LIT>") else "<STR_LIT>",<EOL>self.redirect_to<EOL>)<EOL><DEDENT>else:<EOL><INDENT>destination = self.redirect_to<EOL><DEDENT>try:<EOL><INDENT>sock.sendall("<STR_LIT>" % (<EOL>destination.rstrip("<STR_LIT:/>"),<EOL>path.lstrip("<STR_LIT:/>"),<EOL>))<EOL><DEDENT>except socket.error as e:<EOL><INDENT>if e.errno != errno.EPIPE:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>
Sends back a static error page.