tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

direct.py (499B)


      1 import os
      2 import time
      3 
      4 def main(request, response):
      5    if 'server_slow' in request.url_parts.query:
      6        time.sleep(0.2)
      7    if 'server_no_content' in request.url_parts.query:
      8        return 204, [(b'Content-Type', b'text/plain')], u'Network with %s request' % request.method
      9    if 'server_not_found' in request.url_parts.query:
     10        return 404, [(b'Content-Type', b'text/plain')], u'Not Found'
     11    return 200, [(b'Content-Type', b'text/plain')], u'Network with %s request' % request.method