chromium/net/third_party/quiche/src/quiche/http2/adapter/header_validator.cc

#include "quiche/http2/adapter/header_validator.h"

#include <array>
#include <bitset>
#include <string>

#include "absl/strings/ascii.h"
#include "absl/strings/escaping.h"
#include "absl/strings/numbers.h"
#include "absl/strings/str_cat.h"
#include "quiche/http2/adapter/header_validator_base.h"
#include "quiche/http2/http2_constants.h"
#include "quiche/common/platform/api/quiche_logging.h"

namespace http2 {
namespace adapter {

namespace {

// From RFC 9110 Section 5.6.2.
constexpr absl::string_view kHttpTokenChars =;

constexpr absl::string_view kHttp2HeaderNameAllowedChars =;

constexpr absl::string_view kHttp2HeaderValueAllowedChars =;

constexpr absl::string_view kHttp2StatusValueAllowedChars =;

constexpr absl::string_view kValidAuthorityChars =;

constexpr absl::string_view kValidPathChars =;

constexpr absl::string_view kValidPathCharsWithFragment =;

CharMap;

constexpr CharMap BuildValidCharMap(absl::string_view valid_chars) {}
constexpr CharMap AllowObsText(CharMap map) {}

bool AllCharsInMap(absl::string_view str, const CharMap& map) {}

bool IsValidStatus(absl::string_view status) {}

bool IsValidMethod(absl::string_view method) {}

}  // namespace

void HeaderValidator::StartHeaderBlock() {}

void HeaderValidator::RecordPseudoHeader(PseudoHeaderTag tag) {}

HeaderValidator::HeaderStatus HeaderValidator::ValidateSingleHeader(
    absl::string_view key, absl::string_view value) {}

// Returns true if all required pseudoheaders and no extra pseudoheaders are
// present for the given header type.
bool HeaderValidator::FinishHeaderBlock(HeaderType type) {}

bool HeaderValidator::IsValidHeaderName(absl::string_view name) {}

bool HeaderValidator::IsValidHeaderValue(absl::string_view value,
                                         ObsTextOption option) {}

bool HeaderValidator::IsValidAuthority(absl::string_view authority) {}

bool HeaderValidator::IsValidPath(absl::string_view path, bool allow_fragment) {}

HeaderValidator::ContentLengthStatus HeaderValidator::HandleContentLength(
    absl::string_view value) {}

// Returns whether `authority` contains only characters from the `host` ABNF
// from RFC 3986 section 3.2.2.
bool HeaderValidator::ValidateAndSetAuthority(absl::string_view authority) {}

bool HeaderValidator::ValidateRequestHeaders(
    const PseudoHeaderTagSet& pseudo_headers,
    const PseudoHeaderStateSet& pseudo_header_state,
    bool allow_extended_connect) {}

bool HeaderValidator::ValidateRequestTrailers(
    const PseudoHeaderTagSet& pseudo_headers) {}

bool HeaderValidator::ValidateResponseHeaders(
    const PseudoHeaderTagSet& pseudo_headers) {}

bool HeaderValidator::ValidateResponseTrailers(
    const PseudoHeaderTagSet& pseudo_headers) {}

}  // namespace adapter
}  // namespace http2