mirror of
https://github.com/django/daphne.git
synced 2025-04-20 08:42:18 +03:00
Fix #449: root_path was ending up as None
This commit is contained in:
parent
b52e2e06d7
commit
5a38171fc7
|
@ -182,8 +182,8 @@ class AsgiHandler(base.BaseHandler):
|
|||
self.load_middleware()
|
||||
|
||||
def __call__(self, message):
|
||||
# Set script prefix from message root_path
|
||||
set_script_prefix(message.get('root_path', ''))
|
||||
# Set script prefix from message root_path, turning None into empty string
|
||||
set_script_prefix(message.get('root_path', '') or '')
|
||||
signals.request_started.send(sender=self.__class__, message=message)
|
||||
# Run request through view system
|
||||
try:
|
||||
|
|
|
@ -84,7 +84,7 @@ class Command(RunserverCommand):
|
|||
action_logger=self.log_action,
|
||||
http_timeout=self.http_timeout,
|
||||
ws_protocols=getattr(settings, 'CHANNELS_WS_PROTOCOLS', None),
|
||||
root_path=getattr(settings, 'FORCE_SCRIPT_NAME', ''),
|
||||
root_path=getattr(settings, 'FORCE_SCRIPT_NAME', '') or '',
|
||||
).run()
|
||||
self.logger.debug("Daphne exited")
|
||||
except KeyboardInterrupt:
|
||||
|
|
Loading…
Reference in New Issue
Block a user