Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(857)

Unified Diff: net/spdy/hpack/hpack_huffman_decoder.cc

Issue 2026593002: Remove limit on individual hpack string literals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused include. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/hpack/hpack_huffman_decoder.h ('k') | net/spdy/hpack/hpack_huffman_decoder_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/hpack/hpack_huffman_decoder.cc
diff --git a/net/spdy/hpack/hpack_huffman_decoder.cc b/net/spdy/hpack/hpack_huffman_decoder.cc
index 926223f8ad93633710da412626a13a93aae8396a..30f4ee3c46781d311605fc321405a9b044065d85 100644
--- a/net/spdy/hpack/hpack_huffman_decoder.cc
+++ b/net/spdy/hpack/hpack_huffman_decoder.cc
@@ -304,7 +304,6 @@ char HpackHuffmanDecoder::CanonicalToSource(HuffmanWord canonical) {
// TODO(jamessynge): Determine if that is worth it by adding some counters to
// measure the distribution of string sizes seen in practice.
bool HpackHuffmanDecoder::DecodeString(HpackInputStream* in,
- size_t out_capacity,
std::string* out) {
out->clear();
@@ -369,14 +368,6 @@ bool HpackHuffmanDecoder::DecodeString(HpackInputStream* in,
peeked_success = in->PeekBits(&bits_available, &bits);
} while (peeked_success && bits_available < 32);
} else {
- if (out->size() == out_capacity) {
- // This code would cause us to overflow |out_capacity|.
- // TODO(jamessynge) Avoid this case by pre-allocating out based on
- // scaling up the encoded size by 8/5 (shortest codes are 5 bits).
- DLOG(WARNING) << "Output size too large: " << out_capacity;
- return false;
- }
-
// Convert from the prefix code of length |code_length| to the
// canonical symbol (i.e. where the input symbols (bytes) are ordered by
// increasing code length and then by their increasing uint8 value).
« no previous file with comments | « net/spdy/hpack/hpack_huffman_decoder.h ('k') | net/spdy/hpack/hpack_huffman_decoder_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698