将请求的一些方法改为可exported,方便以后扩展

This commit is contained in:
刘祥超
2021-12-30 11:19:11 +08:00
parent 2525cdc061
commit 7f3f7e21b8
18 changed files with 224 additions and 91 deletions

View File

@@ -200,6 +200,12 @@ func (this *HTTPRequest) doRoot() (isBreak bool) {
respHeader.Set("ETag", eTag)
}
// 调用回调
this.onRequest()
if this.writer.isFinished {
return
}
// 支持 If-None-Match
if this.requestHeader("If-None-Match") == eTag {
// 自定义Header