mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-04 03:27:23 -05:00 
			
		
		
		
	encode: Fix bug where default status code was being written
for small responses. See https://caddy.community/t/v2-permanent-redirect-prompt/6190?u=matt
This commit is contained in:
		
							parent
							
								
									3b80c505fb
								
							
						
					
					
						commit
						46aaf02371
					
				@ -162,9 +162,6 @@ func (rw *responseWriter) Write(p []byte) (int, error) {
 | 
				
			|||||||
		if err != nil {
 | 
							if err != nil {
 | 
				
			||||||
			return 0, err
 | 
								return 0, err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if rw.buf.Len() < rw.config.MinLength {
 | 
					 | 
				
			||||||
			return len(p), nil
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		rw.init()
 | 
							rw.init()
 | 
				
			||||||
		p = rw.buf.Bytes()
 | 
							p = rw.buf.Bytes()
 | 
				
			||||||
		defer func() {
 | 
							defer func() {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user