实现基本的反向代理

This commit is contained in:
刘祥超
2020-09-27 15:26:06 +08:00
parent cb85a9bb01
commit fb587ac0de
13 changed files with 522 additions and 60 deletions

View File

@@ -107,9 +107,8 @@ func (this *HTTPRequest) doRoot() (isBreak bool) {
}
return
} else {
this.write500()
this.write500(err)
logs.Error(err)
this.addError(err)
return true
}
}
@@ -137,9 +136,8 @@ func (this *HTTPRequest) doRoot() (isBreak bool) {
}
return
} else {
this.write500()
this.write500(err)
logs.Error(err)
this.addError(err)
return true
}
}
@@ -220,9 +218,8 @@ func (this *HTTPRequest) doRoot() (isBreak bool) {
reader, err := os.OpenFile(filePath, os.O_RDONLY, 0444)
if err != nil {
this.write500()
this.write500(err)
logs.Error(err)
this.addError(err)
return true
}