mirror of
https://github.com/AsgardEternal/DiscordWhitelist.git
synced 2024-12-28 21:19:14 -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):
|
||||
query = parse_qs(urlparse(self.path).query)
|
||||
if 'grpName' in query:
|
||||
self.send_response(200)
|
||||
self.send_header("Content-type", "text")
|
||||
self.end_headers()
|
||||
grpName = query['grpName'][0]
|
||||
grpfile = "./"
|
||||
if os.path.exists(f"./wlgrps/{grpName}.cfg"):
|
||||
@ -56,10 +59,6 @@ class serveRA(http.server.SimpleHTTPRequestHandler):
|
||||
except:
|
||||
print('failed to serve file!', file=stderr)
|
||||
print(traceback.format_exc(), file=stderr)
|
||||
|
||||
self.send_response(200)
|
||||
self.send_header("Content-type", "text")
|
||||
self.end_headers()
|
||||
else:
|
||||
self.send_response(404)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user