mirror of
https://github.com/django/daphne.git
synced 2025-02-11 22:20:33 +03:00
Merge branch 'master' into ticket_10
This commit is contained in:
commit
f9f799f75f
|
@ -137,7 +137,7 @@ class CommandLineInterface(object):
|
||||||
if args.access_log == "-":
|
if args.access_log == "-":
|
||||||
access_log_stream = sys.stdout
|
access_log_stream = sys.stdout
|
||||||
else:
|
else:
|
||||||
access_log_stream = open(args.access_log, "a")
|
access_log_stream = open(args.access_log, "a", 1)
|
||||||
elif args.verbosity >= 1:
|
elif args.verbosity >= 1:
|
||||||
access_log_stream = sys.stdout
|
access_log_stream = sys.stdout
|
||||||
# Import channel layer
|
# Import channel layer
|
||||||
|
|
|
@ -228,7 +228,7 @@ class WebRequest(http.Request):
|
||||||
logger.debug("HTTP response complete for %s", self.reply_channel)
|
logger.debug("HTTP response complete for %s", self.reply_channel)
|
||||||
try:
|
try:
|
||||||
self.factory.log_action("http", "complete", {
|
self.factory.log_action("http", "complete", {
|
||||||
"path": self.path.decode("ascii"),
|
"path": self.uri.decode("ascii"),
|
||||||
"status": self.code,
|
"status": self.code,
|
||||||
"method": self.method.decode("ascii"),
|
"method": self.method.decode("ascii"),
|
||||||
"client": "%s:%s" % tuple(self.client_addr) if self.client_addr else None,
|
"client": "%s:%s" % tuple(self.client_addr) if self.client_addr else None,
|
||||||
|
@ -314,7 +314,7 @@ class HTTPFactory(http.HTTPFactory):
|
||||||
"Got invalid WebSocket reply message on %s - "
|
"Got invalid WebSocket reply message on %s - "
|
||||||
"contains unknown keys %s (looking for either {'accept', 'text', 'bytes', 'close'})" % (
|
"contains unknown keys %s (looking for either {'accept', 'text', 'bytes', 'close'})" % (
|
||||||
channel,
|
channel,
|
||||||
unknown_message_keys,
|
unknown_keys,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if message.get("accept", None) and protocol.state == protocol.STATE_CONNECTING:
|
if message.get("accept", None) and protocol.state == protocol.STATE_CONNECTING:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user