Skip to content

Commit e8af33f

Browse files
authored
chore: revise the comment of standard transport's readBufferSize (#1362)
2 parents faae220 + e7c6a81 commit e8af33f

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

pkg/app/server/option.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ func WithH2C(enable bool) config.Option {
278278
}}
279279
}
280280

281-
// WithReadBufferSize sets the read buffer size which also limit the header size.
281+
// WithReadBufferSize sets the size of each read buffer node in standard transport.
282+
// NOTE: this cannot limit the header size.
282283
func WithReadBufferSize(size int) config.Option {
283284
return config.Option{F: func(o *config.Options) {
284285
o.ReadBufferSize = size

pkg/network/standard/transport.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,8 @@ import (
3131
)
3232

3333
type transport struct {
34-
// Per-connection buffer size for requests' reading.
35-
// This also limits the maximum header size.
36-
//
37-
// Increase this buffer if your clients send multi-KB RequestURIs
38-
// and/or multi-KB headers (for example, BIG cookies).
39-
//
40-
// Default buffer size is used if not set.
34+
// The underlying read buffer is a buffer node list, `readBufferSize` is the size of a single node.
35+
// `defaultReadBufferSize` (4KB) is used if not set.
4136
readBufferSize int
4237
network string
4338
addr string

0 commit comments

Comments
 (0)