实现新的CC

This commit is contained in:
GoEdgeLab
2021-07-19 10:49:56 +08:00
parent 13f619e142
commit 3e98f32e26
6 changed files with 71 additions and 3 deletions

View File

@@ -514,6 +514,12 @@ func (this *HTTPRequest) Format(source string) string {
return this.requestRemoteUser()
case "requestURI", "requestUri":
return this.rawURI
case "requestURL":
var scheme = "http"
if this.IsHTTPS {
scheme = "https"
}
return scheme + "://" + this.Host + this.rawURI
case "requestPath":
return this.requestPath()
case "requestPathExtension":
@@ -1201,7 +1207,7 @@ func (this *HTTPRequest) canIgnore(err error) bool {
}
// HTTP内部错误
if strings.HasPrefix(err.Error(), "http:") || strings.HasPrefix(err.Error(), "http2:") {
if strings.HasPrefix(err.Error(), "http:") || strings.HasPrefix(err.Error(), "http2:") {
return true
}