Skip to content

Commit

Permalink
Lint, SERVER_PORT.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oberon00 committed Sep 23, 2019
1 parent 0f37eec commit 34aeb08
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def _add_request_attributes(span, environ):
host = environ.get("HTTP_HOST")
if not host:
host = environ["SERVER_NAME"]
port = environ.get("SERVER_PORT")
if port and (
port = environ["SERVER_PORT"]
if (
port != "80"
and environ["wsgi.url_scheme"] == "http"
or port != "443"
Expand Down Expand Up @@ -114,7 +114,9 @@ def __call__(self, environ, start_response):
try:
with tracer.use_span(span):
self._add_request_attributes(span, environ)
start_response = self._create_start_response(span, start_response)
start_response = self._create_start_response(
span, start_response
)

iterable = self.wsgi(environ, start_response)

Expand Down

0 comments on commit 34aeb08

Please sign in to comment.