mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Fix regression: access log template, gitea manager cli command (#24838)
Close #24836  
This commit is contained in:
		@@ -13,6 +13,7 @@ type ResponseWriter interface {
 | 
			
		||||
	http.Flusher
 | 
			
		||||
	Status() int
 | 
			
		||||
	Before(func(ResponseWriter))
 | 
			
		||||
	Size() int // used by access logger template
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var _ ResponseWriter = &Response{}
 | 
			
		||||
@@ -45,6 +46,10 @@ func (r *Response) Write(bs []byte) (int, error) {
 | 
			
		||||
	return size, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (r *Response) Size() int {
 | 
			
		||||
	return r.written
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// WriteHeader write status code
 | 
			
		||||
func (r *Response) WriteHeader(statusCode int) {
 | 
			
		||||
	if !r.beforeExecuted {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user