Skip to content

Commit

Permalink
s/ValidatedReceivedHeaders/ValidateReceivedHeaders/
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 573864633
  • Loading branch information
bnc-google authored and copybara-github committed Oct 16, 2023
1 parent f0af750 commit 17fff07
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions quiche/quic/core/http/quic_spdy_client_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ size_t QuicSpdyClientStream::SendRequest(Http2HeaderBlock headers,
return bytes_sent;
}

bool QuicSpdyClientStream::ValidatedReceivedHeaders(
bool QuicSpdyClientStream::ValidateReceivedHeaders(
const QuicHeaderList& header_list) {
if (!QuicSpdyStream::ValidatedReceivedHeaders(header_list)) {
if (!QuicSpdyStream::ValidateReceivedHeaders(header_list)) {
return false;
}
// Verify the presence of :status header.
Expand Down
2 changes: 1 addition & 1 deletion quiche/quic/core/http/quic_spdy_client_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class QUICHE_EXPORT QuicSpdyClientStream : public QuicSpdyStream {
using QuicSpdyStream::SetPriority;

protected:
bool ValidatedReceivedHeaders(const QuicHeaderList& header_list) override;
bool ValidateReceivedHeaders(const QuicHeaderList& header_list) override;

// Called by OnInitialHeadersComplete to set response_header_. Returns false
// on error.
Expand Down
4 changes: 2 additions & 2 deletions quiche/quic/core/http/quic_spdy_server_stream_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ void QuicSpdyServerStreamBase::StopReading() {
QuicSpdyStream::StopReading();
}

bool QuicSpdyServerStreamBase::ValidatedReceivedHeaders(
bool QuicSpdyServerStreamBase::ValidateReceivedHeaders(
const QuicHeaderList& header_list) {
if (!QuicSpdyStream::ValidatedReceivedHeaders(header_list)) {
if (!QuicSpdyStream::ValidateReceivedHeaders(header_list)) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion quiche/quic/core/http/quic_spdy_server_stream_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class QUICHE_EXPORT QuicSpdyServerStreamBase : public QuicSpdyStream {
void StopReading() override;

protected:
bool ValidatedReceivedHeaders(const QuicHeaderList& header_list) override;
bool ValidateReceivedHeaders(const QuicHeaderList& header_list) override;
};

} // namespace quic
Expand Down
3 changes: 1 addition & 2 deletions quiche/quic/core/http/quic_spdy_session_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ class TestStream : public QuicSpdyStream {
MOCK_METHOD(bool, HasPendingRetransmission, (), (const, override));

protected:
bool ValidatedReceivedHeaders(
const QuicHeaderList& /*header_list*/) override {
bool ValidateReceivedHeaders(const QuicHeaderList& /*header_list*/) override {
return true;
}
};
Expand Down
4 changes: 2 additions & 2 deletions quiche/quic/core/http/quic_spdy_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ void QuicSpdyStream::OnInitialHeadersComplete(
}
// Validate request headers if it did not exceed size limit. If it did,
// OnHeadersTooLarge() should have already handled it previously.
if (!header_too_large && !ValidatedReceivedHeaders(header_list)) {
if (!header_too_large && !ValidateReceivedHeaders(header_list)) {
QUIC_CODE_COUNT_N(quic_validate_request_header, 1, 2);
QUICHE_DCHECK(!invalid_request_details().empty())
<< "ValidatedRequestHeaders() returns false without populating "
Expand Down Expand Up @@ -1659,7 +1659,7 @@ constexpr bool isInvalidHeaderNameCharacter(unsigned char c) {
}
} // namespace

bool QuicSpdyStream::ValidatedReceivedHeaders(
bool QuicSpdyStream::ValidateReceivedHeaders(
const QuicHeaderList& header_list) {
bool force_fail_validation = false;
AdjustTestValue("quic::QuicSpdyStream::request_header_validation_adjust",
Expand Down
6 changes: 3 additions & 3 deletions quiche/quic/core/http/quic_spdy_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@ class QUICHE_EXPORT QuicSpdyStream

void OnWriteSideInDataRecvdState() override;

virtual bool ValidatedReceivedHeaders(const QuicHeaderList& header_list);
virtual bool ValidateReceivedHeaders(const QuicHeaderList& header_list);
// TODO(b/202433856) Merge AreHeaderFieldValueValid into
// ValidatedReceivedHeaders once all flags guarding the behavior of
// ValidatedReceivedHeaders has been rolled out.
// ValidateReceivedHeaders once all flags guarding the behavior of
// ValidateReceivedHeaders has been rolled out.
virtual bool AreHeaderFieldValuesValid(
const QuicHeaderList& header_list) const;

Expand Down

0 comments on commit 17fff07

Please sign in to comment.