mirror of
https://github.com/chubin/cheat.sh
synced 2024-11-10 13:34:13 +00:00
decode utf-8 before logging
This commit is contained in:
parent
c0fd0249b6
commit
6491bfbe70
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ def send_malformed():
|
|||
def log_query(ip, found, topic, user_agent):
|
||||
log_entry = "%s %s %s %s" % (ip, found, topic, user_agent)
|
||||
with open(FILE_QUERIES_LOG, 'a') as my_file:
|
||||
my_file.write(log_entry+"\n")
|
||||
my_file.write(log_entry.encode('utf-8')+"\n")
|
||||
|
||||
@app.route("/", methods=['GET', 'POST'])
|
||||
@app.route("/<path:topic>", methods=["GET", "POST"])
|
||||
|
|
Loading…
Reference in a new issue