mirror of https://gitlab.com/bashrc2/epicyon
Merge branch 'main' into 'main'
Headers should be case-insensitive Closes #39 See merge request bashrc2/epicyon!23merge-requests/30/head
commit
09ea5a13e6
10
daemon.py
10
daemon.py
|
@ -8,6 +8,7 @@ __status__ = "Production"
|
||||||
__module_group__ = "Core"
|
__module_group__ = "Core"
|
||||||
|
|
||||||
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer, HTTPServer
|
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer, HTTPServer
|
||||||
|
import copy
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
|
@ -19398,12 +19399,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
np_thread.kill()
|
np_thread.kill()
|
||||||
|
|
||||||
# make a copy of self.headers
|
# make a copy of self.headers
|
||||||
headers = {}
|
headers = copy.deepcopy(self.headers)
|
||||||
headers_without_cookie = {}
|
headers_without_cookie = copy.deepcopy(headers)
|
||||||
for dict_entry_name, header_line in self.headers.items():
|
del headers_without_cookie['cookie']
|
||||||
headers[dict_entry_name] = header_line
|
|
||||||
if dict_entry_name.lower() != 'cookie':
|
|
||||||
headers_without_cookie[dict_entry_name] = header_line
|
|
||||||
print('New post headers: ' + str(headers_without_cookie))
|
print('New post headers: ' + str(headers_without_cookie))
|
||||||
|
|
||||||
length = int(headers['Content-Length'])
|
length = int(headers['Content-Length'])
|
||||||
|
|
Loading…
Reference in New Issue