@@ -193,7 +193,7 @@ func (h *ResponseHeader) SetConnectionClose() {
193
193
func (h * ResponseHeader ) ResetConnectionClose () {
194
194
if h .connectionClose {
195
195
h .connectionClose = false
196
- h .h = delAllArgsBytes (h .h , strConnection )
196
+ h .h = delAllArgs (h .h , HeaderConnection )
197
197
}
198
198
}
199
199
@@ -211,7 +211,7 @@ func (h *RequestHeader) SetConnectionClose() {
211
211
func (h * RequestHeader ) ResetConnectionClose () {
212
212
if h .connectionClose {
213
213
h .connectionClose = false
214
- h .h = delAllArgsBytes (h .h , strConnection )
214
+ h .h = delAllArgs (h .h , HeaderConnection )
215
215
}
216
216
}
217
217
@@ -251,7 +251,7 @@ func (h *ResponseHeader) SetContentLength(contentLength int) {
251
251
h .contentLength = contentLength
252
252
if contentLength >= 0 {
253
253
h .contentLengthBytes = AppendUint (h .contentLengthBytes [:0 ], contentLength )
254
- h .h = delAllArgsBytes (h .h , strTransferEncoding )
254
+ h .h = delAllArgs (h .h , HeaderTransferEncoding )
255
255
return
256
256
} else if contentLength == - 1 {
257
257
h .contentLengthBytes = h .contentLengthBytes [:0 ]
@@ -296,7 +296,7 @@ func (h *RequestHeader) SetContentLength(contentLength int) {
296
296
h .contentLength = contentLength
297
297
if contentLength >= 0 {
298
298
h .contentLengthBytes = AppendUint (h .contentLengthBytes [:0 ], contentLength )
299
- h .h = delAllArgsBytes (h .h , strTransferEncoding )
299
+ h .h = delAllArgs (h .h , HeaderTransferEncoding )
300
300
} else {
301
301
h .contentLengthBytes = h .contentLengthBytes [:0 ]
302
302
h .h = setArgBytes (h .h , strTransferEncoding , strChunked , argsHasValue )
@@ -1360,7 +1360,7 @@ func (h *ResponseHeader) del(key []byte) {
1360
1360
case HeaderTrailer :
1361
1361
h .trailer = h .trailer [:0 ]
1362
1362
}
1363
- h .h = delAllArgsBytes (h .h , key )
1363
+ h .h = delAllArgs (h .h , b2s ( key ) )
1364
1364
}
1365
1365
1366
1366
// Del deletes header with the given key.
@@ -1394,7 +1394,7 @@ func (h *RequestHeader) del(key []byte) {
1394
1394
case HeaderTrailer :
1395
1395
h .trailer = h .trailer [:0 ]
1396
1396
}
1397
- h .h = delAllArgsBytes (h .h , key )
1397
+ h .h = delAllArgs (h .h , b2s ( key ) )
1398
1398
}
1399
1399
1400
1400
// setSpecialHeader handles special headers and return true when a header is processed.
0 commit comments