mirror of
https://github.com/AsgardEternal/DiscordWhitelist.git
synced 2024-12-30 12:59:13 -06:00
fix header response
This commit is contained in:
parent
431eaab7c8
commit
878383af12
@ -17,6 +17,9 @@ class serveRA(http.server.SimpleHTTPRequestHandler):
|
|||||||
def do_GET(self):
|
def do_GET(self):
|
||||||
query = parse_qs(urlparse(self.path).query)
|
query = parse_qs(urlparse(self.path).query)
|
||||||
if 'grpName' in query:
|
if 'grpName' in query:
|
||||||
|
self.send_response(200)
|
||||||
|
self.send_header("Content-type", "text")
|
||||||
|
self.end_headers()
|
||||||
grpName = query['grpName'][0]
|
grpName = query['grpName'][0]
|
||||||
grpfile = "./"
|
grpfile = "./"
|
||||||
if os.path.exists(f"./wlgrps/{grpName}.cfg"):
|
if os.path.exists(f"./wlgrps/{grpName}.cfg"):
|
||||||
@ -56,10 +59,6 @@ class serveRA(http.server.SimpleHTTPRequestHandler):
|
|||||||
except:
|
except:
|
||||||
print('failed to serve file!', file=stderr)
|
print('failed to serve file!', file=stderr)
|
||||||
print(traceback.format_exc(), file=stderr)
|
print(traceback.format_exc(), file=stderr)
|
||||||
|
|
||||||
self.send_response(200)
|
|
||||||
self.send_header("Content-type", "text")
|
|
||||||
self.end_headers()
|
|
||||||
else:
|
else:
|
||||||
self.send_response(404)
|
self.send_response(404)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user