Merge branch 'master' into ticket_10

This commit is contained in:
Sean Mc Allister 2016-11-04 14:40:40 +01:00
commit f9f799f75f
2 changed files with 3 additions and 3 deletions

View File

@ -137,7 +137,7 @@ class CommandLineInterface(object):
if args.access_log == "-":
access_log_stream = sys.stdout
else:
access_log_stream = open(args.access_log, "a")
access_log_stream = open(args.access_log, "a", 1)
elif args.verbosity >= 1:
access_log_stream = sys.stdout
# Import channel layer

View File

@ -228,7 +228,7 @@ class WebRequest(http.Request):
logger.debug("HTTP response complete for %s", self.reply_channel)
try:
self.factory.log_action("http", "complete", {
"path": self.path.decode("ascii"),
"path": self.uri.decode("ascii"),
"status": self.code,
"method": self.method.decode("ascii"),
"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 - "
"contains unknown keys %s (looking for either {'accept', 'text', 'bytes', 'close'})" % (
channel,
unknown_message_keys,
unknown_keys,
)
)
if message.get("accept", None) and protocol.state == protocol.STATE_CONNECTING: