MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / calculateHeaderLength

Method calculateHeaderLength

internal/nodes/http_writer.go:1284–1294  ·  view source on GitHub ↗

计算Header长度

()

Source from the content-addressed store, hash-verified

1282
1283// 计算Header长度
1284func (this *HTTPWriter) calculateHeaderLength() (result int) {
1285 for k, v := range this.Header() {
1286 if this.shouldIgnoreHeader(k) {
1287 continue
1288 }
1289 for _, v1 := range v {
1290 result += len(k) + 1 /**:**/ + len(v1) + 1 /**\n**/
1291 }
1292 }
1293 return
1294}
1295
1296func (this *HTTPWriter) shouldIgnoreHeader(name string) bool {
1297 switch name {

Callers 2

PrepareCacheMethod · 0.95
PrepareCompressionMethod · 0.95

Calls 2

HeaderMethod · 0.95
shouldIgnoreHeaderMethod · 0.95

Tested by

no test coverage detected