fix: set status not work
This commit is contained in:
		
							
								
								
									
										4
									
								
								ctx.go
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								ctx.go
									
									
									
									
									
								
							@@ -255,8 +255,8 @@ func (c *Ctx) Status(code int) *Ctx {
 | 
			
		||||
	c.lock.Lock()
 | 
			
		||||
	defer c.lock.Unlock()
 | 
			
		||||
 | 
			
		||||
	c.StatusCode = code
 | 
			
		||||
	c.writermem.status = code
 | 
			
		||||
	c.writermem.WriteHeader(code)
 | 
			
		||||
	c.StatusCode = c.writermem.status
 | 
			
		||||
 | 
			
		||||
	return c
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -103,7 +103,7 @@ func (w *responseWriter) Size() int {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (w *responseWriter) Written() bool {
 | 
			
		||||
	return w.size != noWritten || w.status != 0
 | 
			
		||||
	return w.size != noWritten
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Hijack implements the http.Hijacker interface.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user