| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 10f05b6 commit 156f2f3
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -668,7 +668,7 @@ Http2Session::Http2Session(Environment* env, | |||
| 668 | 668 | // fails. | |
| 669 | 669 | CHECK_EQ(fn(&session_, callbacks, this, *opts, *allocator_info), 0); | |
| 670 | 670 | ||
| 671 | - outgoing_storage_.reserve(4096); | ||
| 671 | + outgoing_storage_.reserve(1024); | ||
| 672 | 672 | outgoing_buffers_.reserve(32); | |
| 673 | 673 | ||
| 674 | 674 | { | |
@@ -1993,9 +1993,10 @@ Http2Stream::Http2Stream( | |||
| 1993 | 1993 | ||
| 1994 | 1994 | // Limit the number of header pairs | |
| 1995 | 1995 | max_header_pairs_ = session->GetMaxHeaderPairs(); | |
| 1996 | - if (max_header_pairs_ == 0) | ||
| 1997 | - max_header_pairs_ = DEFAULT_MAX_HEADER_LIST_PAIRS; | ||
| 1998 | - current_headers_.reserve(max_header_pairs_); | ||
| 1996 | + if (max_header_pairs_ == 0) { | ||
| 1997 | + max_header_pairs_ = DEFAULT_MAX_HEADER_LIST_PAIRS; | ||
| 1998 | + } | ||
| 1999 | + current_headers_.reserve(std::min(max_header_pairs_, 12u)); | ||
| 1999 | 2000 | ||
| 2000 | 2001 | // Limit the number of header octets | |
| 2001 | 2002 | max_header_length_ = | |
| Back | FazBrowse Home | New Git URL |
0 commit comments