forked from indymedia/epicyon
Set protocol version in class
parent
50a1232574
commit
bbf2ed272b
|
@ -134,8 +134,9 @@ def readFollowList(filename: str):
|
|||
return followlist
|
||||
|
||||
class PubServer(BaseHTTPRequestHandler):
|
||||
protocol_version = 'HTTP/1.0'
|
||||
|
||||
def _login_headers(self,fileFormat: str,length: int) -> None:
|
||||
self.protocol_version='HTTP/1.1'
|
||||
self.send_response(200)
|
||||
self.send_header('Content-type', fileFormat)
|
||||
self.send_header('Content-Length', str(length))
|
||||
|
@ -144,7 +145,6 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.end_headers()
|
||||
|
||||
def _set_headers(self,fileFormat: str,length: int,cookie: str) -> None:
|
||||
self.protocol_version='HTTP/1.1'
|
||||
self.send_response(200)
|
||||
self.send_header('Content-type', fileFormat)
|
||||
self.send_header('Content-Length', str(length))
|
||||
|
@ -155,7 +155,6 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.end_headers()
|
||||
|
||||
def _redirect_headers(self,redirect: str,cookie: str) -> None:
|
||||
self.protocol_version='HTTP/1.1'
|
||||
self.send_response(303)
|
||||
self.send_header('Content-type', 'text/html')
|
||||
if cookie:
|
||||
|
@ -166,7 +165,6 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.end_headers()
|
||||
|
||||
def _404(self) -> None:
|
||||
self.protocol_version='HTTP/1.1'
|
||||
msg="<html><head></head><body><h1>404 Not Found</h1></body></html>".encode('utf-8')
|
||||
self.send_response(404)
|
||||
self.send_header('Content-Type', 'text/html; charset=utf-8')
|
||||
|
|
Loading…
Reference in New Issue