From 26b01e96ac3018d41414af57593b71ae3c320fe3 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 24 Jun 2021 11:01:37 +0800 Subject: [PATCH] bugfix --- ahserver/baseProcessor.py | 2 +- ahserver/configuredServer.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ahserver/baseProcessor.py b/ahserver/baseProcessor.py index bef7669..28138b2 100644 --- a/ahserver/baseProcessor.py +++ b/ahserver/baseProcessor.py @@ -172,7 +172,7 @@ class MarkdownProcessor(BaseProcessor): async def datahandle(self,request:Request): data = '' - with codecs.open(self.real_path,'rb','utf-8') as f: + with codecs.open(self.real_path,'r','utf-8') as f: data = f.read() self.content = self.urlreplace(data, request) diff --git a/ahserver/configuredServer.py b/ahserver/configuredServer.py index 3cff8c2..cc7285a 100644 --- a/ahserver/configuredServer.py +++ b/ahserver/configuredServer.py @@ -1,4 +1,5 @@ import os,sys +import time import ssl from socket import * from aiohttp import web