fix bug
This commit is contained in:
		
							parent
							
								
									095e52b941
								
							
						
					
					
						commit
						66473ff531
					
				| @ -199,7 +199,7 @@ func (c *Controller) ServeJson() { | |||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
| 	c.Ctx.SetHeader("Content-Length", strconv.Itoa(len(content)), true) | 	c.Ctx.SetHeader("Content-Length", strconv.Itoa(len(content)), true) | ||||||
| 	ctx.ResponseWriter.Header().Set("Content-Type", "application/json") | 	c.Ctx.ResponseWriter.Header().Set("Content-Type", "application/json") | ||||||
| 	c.Ctx.ResponseWriter.Write(content) | 	c.Ctx.ResponseWriter.Write(content) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -210,7 +210,7 @@ func (c *Controller) ServeXml() { | |||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
| 	c.Ctx.SetHeader("Content-Length", strconv.Itoa(len(content)), true) | 	c.Ctx.SetHeader("Content-Length", strconv.Itoa(len(content)), true) | ||||||
| 	ctx.ResponseWriter.Header().Set("Content-Type", "application/xml") | 	c.Ctx.ResponseWriter.Header().Set("Content-Type", "application/xml") | ||||||
| 	c.Ctx.ResponseWriter.Write(content) | 	c.Ctx.ResponseWriter.Write(content) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user