实现基本的反向代理

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

@@ -17,7 +17,11 @@ func (this *HTTPRequest) write404() {
_, _ = this.writer.Write([]byte(msg))
}
func (this *HTTPRequest) write500() {
func (this *HTTPRequest) write500(err error) {
if err != nil {
this.addError(err)
}
statusCode := http.StatusInternalServerError
if this.doPage(statusCode) {
return