Prechádzať zdrojové kódy

Do not pass Content-Length to the client

Fixes pages randomly cutting off
RichardG867 5 rokov pred
rodič
commit
af59cc3221
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      waybackproxy.py

+ 1 - 1
waybackproxy.py

@@ -317,7 +317,7 @@ class Handler(socketserver.BaseRequestHandler):
 			if header.find('X-Archive-Orig-') == 0:
 				orig_header = header[15:]
 				# blacklist certain headers which may alter the client
-				if orig_header.lower() not in ('connection', 'location', 'content-type', 'etag', 'authorization', 'set-cookie'):
+				if orig_header.lower() not in ('connection', 'location', 'content-type', 'content-length', 'etag', 'authorization', 'set-cookie'):
 					response += orig_header + ': ' + headers[header] + '\r\n'
 
 		# finish and send the request