| Index: net/quic/quic_spdy_stream.cc
|
| diff --git a/net/quic/quic_spdy_stream.cc b/net/quic/quic_spdy_stream.cc
|
| index f1a21d4e8dc568c295117ecb3c7bbceecab0e2f3..ac09e9f8e7e812cd7beb5a7c22614d6bbc5a7704 100644
|
| --- a/net/quic/quic_spdy_stream.cc
|
| +++ b/net/quic/quic_spdy_stream.cc
|
| @@ -12,8 +12,8 @@
|
| #include "net/quic/quic_write_blocked_list.h"
|
| #include "net/quic/spdy_utils.h"
|
|
|
| +using base::IntToString;
|
| using base::StringPiece;
|
| -using net::SpdyPriority;
|
| using std::min;
|
| using std::string;
|
|
|
| @@ -101,9 +101,9 @@ size_t QuicSpdyStream::WriteTrailers(
|
| DVLOG(1) << "Inserting trailer: (" << kFinalOffsetHeaderKey << ", "
|
| << stream_bytes_written() + queued_data_bytes() << ")";
|
| SpdyHeaderBlock trailer_block_with_offset(trailer_block);
|
| - trailer_block_with_offset.insert(std::make_pair(
|
| - kFinalOffsetHeaderKey,
|
| - base::IntToString(stream_bytes_written() + queued_data_bytes())));
|
| + trailer_block_with_offset.insert(
|
| + std::make_pair(kFinalOffsetHeaderKey,
|
| + IntToString(stream_bytes_written() + queued_data_bytes())));
|
|
|
| // Write the trailing headers with a FIN, and close stream for writing:
|
| // trailers are the last thing to be sent on a stream.
|
| @@ -361,9 +361,13 @@ bool QuicSpdyStream::FinishedReadingHeaders() const {
|
| header_list_.empty();
|
| }
|
|
|
| -bool QuicSpdyStream::ParseHeaderStatusCode(SpdyHeaderBlock* header,
|
| +bool QuicSpdyStream::ParseHeaderStatusCode(const SpdyHeaderBlock& header,
|
| int* status_code) const {
|
| - StringPiece status = (*header)[":status"];
|
| + SpdyHeaderBlock::const_iterator it = header.find(":status");
|
| + if (it == header.end()) {
|
| + return false;
|
| + }
|
| + const StringPiece status(it->second);
|
| if (status.size() != 3) {
|
| return false;
|
| }
|
|
|