Websocket支持自定义响应Header

This commit is contained in:
刘祥超
2022-09-23 14:21:53 +08:00
parent 0973765919
commit fce2879567
15 changed files with 71 additions and 45 deletions

View File

@@ -1611,9 +1611,7 @@ func (this *HTTPRequest) fixRequestHeader(header http.Header) {
}
// 处理自定义Response Header
func (this *HTTPRequest) processResponseHeaders(statusCode int) {
var responseHeader = this.writer.Header()
func (this *HTTPRequest) processResponseHeaders(responseHeader http.Header, statusCode int) {
// 删除/添加/替换Header
// TODO 实现AddTrailers
if this.web.ResponseHeaderPolicy != nil && this.web.ResponseHeaderPolicy.IsOn {