计算Header长度
()
| 1282 | |
| 1283 | // 计算Header长度 |
| 1284 | func (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 | |
| 1296 | func (this *HTTPWriter) shouldIgnoreHeader(name string) bool { |
| 1297 | switch name { |
no test coverage detected