From e1647837d453b2361d83da0bb934d0bfb31c4537 Mon Sep 17 00:00:00 2001 From: benoitc Date: Thu, 17 Jun 2010 00:43:48 +0200 Subject: [PATCH] some errors spotted by pyflakes --- gunicorn/app/wsgiapp.py | 1 - gunicorn/http/__init__.py | 2 ++ gunicorn/http/parser.py | 2 -- gunicorn/http/wsgi.py | 4 ++-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gunicorn/app/wsgiapp.py b/gunicorn/app/wsgiapp.py index 99e00258..001f4db5 100644 --- a/gunicorn/app/wsgiapp.py +++ b/gunicorn/app/wsgiapp.py @@ -5,7 +5,6 @@ import os import sys -import traceback from gunicorn import util from gunicorn.app.base import Application diff --git a/gunicorn/http/__init__.py b/gunicorn/http/__init__.py index f66a0f68..63dcdfc1 100644 --- a/gunicorn/http/__init__.py +++ b/gunicorn/http/__init__.py @@ -5,3 +5,5 @@ from gunicorn.http.message import Message, Request from gunicorn.http.parser import RequestParser + +__all__ = [Message, Request, RequestParser] \ No newline at end of file diff --git a/gunicorn/http/parser.py b/gunicorn/http/parser.py index 8b7bcf6f..1ee29448 100644 --- a/gunicorn/http/parser.py +++ b/gunicorn/http/parser.py @@ -3,8 +3,6 @@ # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. -import socket - from gunicorn.http.message import Request from gunicorn.http.unreader import SocketUnreader, IterUnreader diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index 758ae502..d43976b3 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -39,9 +39,9 @@ def create(req, sock, client, server, debug=False): sock.send("HTTP/1.1 100 Continue\r\n\r\n") elif name == "x-forwarded-for": forward = hdr_value - elif name == "x-forwarded-protocol" and value.lower() == "ssl": + elif name == "x-forwarded-protocol" and hdr_value.lower() == "ssl": url_scheme = "https" - elif name == "x-forwarded-ssl" and value.lower() == "on": + elif name == "x-forwarded-ssl" and hdr_value.lower() == "on": url_scheme = "https" elif name == "host": server = hdr_value