I am using google appening, it's CGI environment. I want block some request, I want response nothing even no http status code. Alternative, I want just close the connection. Can I do this?
update:
I have decide to use what pyfunc said, use 204 status, but how can I do this at GAE CGI environment without any webframework.
update 2:
Thanks a lot, but... I really need a CGI way, not WSGI way. Please see the comment in my codes.
def main()
#Block requests at once.
if (settings.BLOCK_DOWNLOAD and os.environ.get('HTTP_RANGE')) \
or (settings.BLOCK_EXTENSION.match(os.environ['PATH_INFO'])):
#TODO: return 204 response in CGI way.
#I really do not need construct a WSGIApplication and then response a status code.
return
application = webapp.WSGIApplication([
(r'/', MainHandler),
#...
], debug=True)
run_wsgi_app(application)
if __name__ == '__main__':
main()