naiveproxy/net/third_party/http2/hpack/http2_hpack_constants.cc

34 lines
1.0 KiB
C++
Raw Normal View History

2018-08-15 01:19:20 +03:00
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/third_party/http2/hpack/http2_hpack_constants.h"
#include <sstream>
#include "net/third_party/http2/platform/api/http2_string_utils.h"
namespace http2 {
Http2String HpackEntryTypeToString(HpackEntryType v) {
switch (v) {
case HpackEntryType::kIndexedHeader:
return "kIndexedHeader";
case HpackEntryType::kDynamicTableSizeUpdate:
return "kDynamicTableSizeUpdate";
case HpackEntryType::kIndexedLiteralHeader:
return "kIndexedLiteralHeader";
case HpackEntryType::kUnindexedLiteralHeader:
return "kUnindexedLiteralHeader";
case HpackEntryType::kNeverIndexedLiteralHeader:
return "kNeverIndexedLiteralHeader";
}
return Http2StrCat("UnknownHpackEntryType(", static_cast<int>(v), ")");
}
std::ostream& operator<<(std::ostream& out, HpackEntryType v) {
return out << HpackEntryTypeToString(v);
}
} // namespace http2