mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 16:00:25 +08:00 
			
		
		
		
	40x, 50x提示默认使用HTML;50x提示增加原因信息
This commit is contained in:
		@@ -151,7 +151,7 @@ func (this *HTTPRequest) Do() {
 | 
			
		||||
	// Web配置
 | 
			
		||||
	err := this.configureWeb(this.ReqServer.Web, true, 0)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		this.write50x(err, http.StatusInternalServerError, false)
 | 
			
		||||
		this.write50x(err, http.StatusInternalServerError, "Failed to configure the server", "配置服务失败", false)
 | 
			
		||||
		this.doEnd()
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
@@ -286,7 +286,7 @@ func (this *HTTPRequest) doBegin() {
 | 
			
		||||
			var err error
 | 
			
		||||
			this.requestBodyData, err = ioutil.ReadAll(io.LimitReader(this.RawReq.Body, AccessLogMaxRequestBodySize))
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				this.write50x(err, http.StatusBadGateway, false)
 | 
			
		||||
				this.write50x(err, http.StatusBadGateway, "Failed to read request body for access log", "为访问日志读取请求Body失败", false)
 | 
			
		||||
				return
 | 
			
		||||
			}
 | 
			
		||||
			this.RawReq.Body = ioutil.NopCloser(io.MultiReader(bytes.NewBuffer(this.requestBodyData), this.RawReq.Body))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user