def _writeResponse(self, response, request, status=<NUM_LIT:200>):
request.setResponseCode(status)<EOL>if self.encoding is not None:<EOL><INDENT>mimeType = '<STR_LIT>' % self.encoding<EOL><DEDENT>else:<EOL><INDENT>mimeType = "<STR_LIT>"<EOL><DEDENT>request.setHeader("<STR_LIT:Content-Type>", mimeType)<EOL>request.setHeader("<STR_LIT>", str(len(response)))<EOL>request.write(response)<EOL>request.finish()<EOL>
request -- request message
response --- response message
status -- HTTP Status