forked from indymedia/epicyon
Tidying
parent
889356b0b1
commit
40e52d0744
|
@ -525,12 +525,11 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _redirect_headers(self, redirect: str, cookie: str,
|
def _redirect_headers(self, redirect: str, cookie: str,
|
||||||
callingDomain: str, httpRedirect=True) -> None:
|
callingDomain: str) -> None:
|
||||||
if '://' not in redirect:
|
if '://' not in redirect:
|
||||||
print('REDIRECT ERROR: redirect is not an absolute url ' +
|
print('REDIRECT ERROR: redirect is not an absolute url ' +
|
||||||
redirect)
|
redirect)
|
||||||
|
|
||||||
if httpRedirect:
|
|
||||||
self.send_response(303)
|
self.send_response(303)
|
||||||
|
|
||||||
if cookie:
|
if cookie:
|
||||||
|
@ -546,10 +545,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.send_header('Content-Length', '0')
|
self.send_header('Content-Length', '0')
|
||||||
self.send_header('X-Robots-Tag', 'noindex')
|
self.send_header('X-Robots-Tag', 'noindex')
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
if not httpRedirect:
|
|
||||||
self.Path = redirect.replace(callingDomain, '')
|
|
||||||
print('Redirect path: ' + self.Path)
|
|
||||||
self.do_GET()
|
|
||||||
|
|
||||||
def _httpReturnCode(self, httpCode: int, httpDescription: str) -> None:
|
def _httpReturnCode(self, httpCode: int, httpDescription: str) -> None:
|
||||||
msg = "<html><head></head><body><h1>" + str(httpCode) + " " + \
|
msg = "<html><head></head><body><h1>" + str(httpCode) + " " + \
|
||||||
|
|
Loading…
Reference in New Issue