| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/spdy/spdy_session.h" | 5 #include "net/spdy/spdy_session.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
| (...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1008 return; | 1008 return; |
| 1009 } | 1009 } |
| 1010 | 1010 |
| 1011 LOG(INFO) << "SPDY SYN_REPLY RESPONSE HEADERS for stream: " << stream_id; | 1011 LOG(INFO) << "SPDY SYN_REPLY RESPONSE HEADERS for stream: " << stream_id; |
| 1012 DumpSpdyHeaders(headers); | 1012 DumpSpdyHeaders(headers); |
| 1013 | 1013 |
| 1014 // We record content declared as being pushed so that we don't | 1014 // We record content declared as being pushed so that we don't |
| 1015 // request a duplicate stream which is already scheduled to be | 1015 // request a duplicate stream which is already scheduled to be |
| 1016 // sent to us. | 1016 // sent to us. |
| 1017 spdy::SpdyHeaderBlock::const_iterator it; | 1017 spdy::SpdyHeaderBlock::const_iterator it; |
| 1018 it = headers.find("X-Associated-Content"); | 1018 it = headers.find("x-associated-content"); |
| 1019 if (it != headers.end()) { | 1019 if (it != headers.end()) { |
| 1020 const std::string& content = it->second; | 1020 const std::string& content = it->second; |
| 1021 std::string::size_type start = 0; | 1021 std::string::size_type start = 0; |
| 1022 std::string::size_type end = 0; | 1022 std::string::size_type end = 0; |
| 1023 do { | 1023 do { |
| 1024 end = content.find("||", start); | 1024 end = content.find("||", start); |
| 1025 if (end == std::string::npos) | 1025 if (end == std::string::npos) |
| 1026 end = content.length(); | 1026 end = content.length(); |
| 1027 std::string url = content.substr(start, end - start); | 1027 std::string url = content.substr(start, end - start); |
| 1028 std::string::size_type pos = url.find("??"); | 1028 std::string::size_type pos = url.find("??"); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 if (settings.empty()) | 1134 if (settings.empty()) |
| 1135 return; | 1135 return; |
| 1136 | 1136 |
| 1137 // Create the SETTINGS frame and send it. | 1137 // Create the SETTINGS frame and send it. |
| 1138 scoped_ptr<spdy::SpdySettingsControlFrame> settings_frame( | 1138 scoped_ptr<spdy::SpdySettingsControlFrame> settings_frame( |
| 1139 spdy_framer_.CreateSettings(settings)); | 1139 spdy_framer_.CreateSettings(settings)); |
| 1140 QueueFrame(settings_frame.get(), 0, NULL); | 1140 QueueFrame(settings_frame.get(), 0, NULL); |
| 1141 } | 1141 } |
| 1142 | 1142 |
| 1143 } // namespace net | 1143 } // namespace net |
| OLD | NEW |