Fix for the Tornado server #38

Closed
wants to merge 1 commit into
from

Conversation

2 participants
@matrixise

Hi Armin,

I fixed a small bug when we try to use nginx with Tornado and Flask.

The value of SERVER_PORT is an integer value and not a String, and we have a traceback, because it can concat a string with an integer.

Regards,

Stéphane.

PS: I think my commit message is wrong.

@mitsuhiko

This comment has been minimized.

Show comment
Hide comment
@mitsuhiko

mitsuhiko Feb 28, 2011

Member

This is a bug in tornado and should be fixed there. I will not change Werkzeug in that regard because it opens a can of worms and there might be other places where SERVER_PORT is used.

This problem can easily be worked around with a small WSGI middleware: http://paste.pocoo.org/show/345661/

Member

mitsuhiko commented Feb 28, 2011

This is a bug in tornado and should be fixed there. I will not change Werkzeug in that regard because it opens a can of worms and there might be other places where SERVER_PORT is used.

This problem can easily be worked around with a small WSGI middleware: http://paste.pocoo.org/show/345661/

@matrixise

This comment has been minimized.

Show comment
Hide comment
@matrixise

matrixise Feb 28, 2011

I agree with you, I created a small middleware based on your code, and it works fine.

Thank you and sorry for my Pull Request.

Stéphane

I agree with you, I created a small middleware based on your code, and it works fine.

Thank you and sorry for my Pull Request.

Stéphane

This issue was closed.

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