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

Server.satistics failing for wsgiserver3.py #1414

Open
ghost opened this issue Apr 20, 2016 · 2 comments
Open

Server.satistics failing for wsgiserver3.py #1414

ghost opened this issue Apr 20, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 20, 2016

Originally reported by: Anonymous


When server.statistics is set to collect statistics with the inbuilt wsgiserver, we see the following exception:

Exception in thread CP Server Thread-3:
[20/Apr/2016:14:21:56] ENGINE Bus STARTED
Traceback (most recent call last):
File "C:\Python34\lib\threading.py", line 911, in _bootstrap_inner
self.run()
File "C:\Users\devbevanl\cherryapi\venv\lib\site-packages\cherrypy\wsgiserver\wsgiserver3.py", line 1256, in run
self.bytes_read += self.conn.rfile.bytes_read
AttributeError: 'BufferedReader' object has no attribute 'bytes_read'


@polotek
Copy link

polotek commented Aug 26, 2016

Is there a plan to fix this? It looks like the problem is that BufferedReader is a wrapper around a connection and doesn't have the bytes_read property. I could think of a couple of ways to approach this, and I'm willing to work up a PR. Would you accept it? Any guidance is appreciated.

@webknjaz
Copy link
Member

webknjaz commented Aug 26, 2016

Hello,

First of all it would be nice to see minimal snippet for reproducing the issue. Keep in mind, that now wsgiserver3.py and wsgiserver2.py are megred into a single module working under both Python 2 and Python 3. Please confirm that this issue still exists in supported Python 3 environment for the latest CherryPy version.

Second, if the problem is still worth fixing it, PR should contain:

  • Documentation, describing the feature (as currently it's not well-documented)
  • Bugfix itself
  • Tests proving it works for all supported Python versions (2.7-3.6)

Finally, we'll point out any issues in your PR to let you fix them before approval and there are a couple of external checks (like Travis CI) helping you to get an idea whether you break anything with your PR.

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

No branches or pull requests

3 participants