Просмотр исходного кода

Do not pass Content-Length to the client

Fixes pages randomly cutting off
RichardG867 5 лет назад
Родитель
Сommit
af59cc3221
1 измененных файлов с 1 добавлено и 1 удалено
  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