mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	run-dev: Discard Transfer-Encoding header from upstream response.
When the upstream provides a chunked response, proxying this header causes a protocol-level miscommunication. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							d840d80ed4
						
					
				
				
					commit
					2fe1ece3a6
				
			@@ -261,7 +261,8 @@ class BaseHandler(web.RequestHandler):
 | 
			
		||||
 | 
			
		||||
            for header, v in response.headers.get_all():
 | 
			
		||||
                # some header appear multiple times, eg 'Set-Cookie'
 | 
			
		||||
                self.add_header(header, v)
 | 
			
		||||
                if header.lower() != "transfer-encoding":
 | 
			
		||||
                    self.add_header(header, v)
 | 
			
		||||
            if response.body:
 | 
			
		||||
                self.write(response.body)
 | 
			
		||||
        self.finish()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user