Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gevent Broken Pipe #47

Closed
shakna-israel opened this issue Feb 8, 2015 · 3 comments
Closed

Gevent Broken Pipe #47

shakna-israel opened this issue Feb 8, 2015 · 3 comments

Comments

@shakna-israel
Copy link
Contributor

When running in debug mode, accessing the console raises Gevent #445, in UiServer and UiRequest.

Console Window

Debug Window

@HelloZeroNet
Copy link
Owner

It's normal:

  • /Console raises a custom exception "Here is your console" to spawn the werkzeug console in UiRequest namespace. (You can access the console by hover over raise Exception("Here is your console") line the clicking the second icon from right.) Its a little bit hackish, but works :)
  • /Debug always display the last error's namespace (in next version I will exclude notifications from it)

@shakna-israel
Copy link
Contributor Author

'HTTP_HOST': '104.131.8.131',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
 'HTTP_X_FORWARDED_FOR': '66.249.73.184',
 'HTTP_X_REAL_IP': '66.249.73.184',
 'PATH_INFO': '/Console',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '127.0.0.1',
 'REMOTE_PORT': '54914',
 'REQUEST_METHOD': 'GET',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'tester',
 'SERVER_PORT': '43110',
 'SERVER_PROTOCOL': 'HTTP/1.0',
 'SERVER_SOFTWARE': 'gevent/1.0 Python/2.7',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7f53f74101e0>,
 'wsgi.input': <gevent.pywsgi.Input object at 0x7f53eaac0910>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': False,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)} failed with Exception

In the console seems a bit odd, in that case.

@HelloZeroNet
Copy link
Owner

Ah looks like the google bot found the console url somehow. I'm going to restrict the /Console and /Debug access to debug mode only.

Update: Looks like its restricted already:

        # Debug
        elif path == "/Debug" and config.debug:
            return self.actionDebug()
        elif path == "/Console" and config.debug:
            return self.actionConsole()

The exception it raises in non debug mode:

  File "F:\Work\ZeroNet\src\Site\SiteManager.py", line 47, in need
    if not isAddress(address): raise Exception("Not address: %s" % address)
Exception: Not address: Console

So i have to make a better error message for this

Update #2: Ok fixed, in next version it will drop "Not Found: /Console", thanks for the bugreport

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants