Skip to content

Commit

Permalink
fix: Remove old WSGIRequestHandler workaround
Browse files Browse the repository at this point in the history
This was fixed upstream a long time ago.

fixes #1472
  • Loading branch information
defnull committed Feb 15, 2025
1 parent ee24927 commit c65347f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bottle.py
Original file line number Diff line number Diff line change
Expand Up @@ -3398,12 +3398,9 @@ def run(self, app): # pragma: no cover
import socket

class FixedHandler(WSGIRequestHandler):
def address_string(self): # Prevent reverse DNS lookups please.
return self.client_address[0]

def log_request(*args, **kw):
def log_message(other, format, *args):
if not self.quiet:
return WSGIRequestHandler.log_request(*args, **kw)
return WSGIRequestHandler.log_message(other, format, *args)

handler_cls = self.options.get('handler_class', FixedHandler)
server_cls = self.options.get('server_class', WSGIServer)
Expand Down

0 comments on commit c65347f

Please # to comment.