Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 2713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2724 // that is trusted explicitly via the --trusted-spdy-proxy switch. | 2724 // that is trusted explicitly via the --trusted-spdy-proxy switch. |
| 2725 if (trusted_spdy_proxy_.Equals(host_port_pair())) { | 2725 if (trusted_spdy_proxy_.Equals(host_port_pair())) { |
| 2726 // Disallow pushing of HTTPS content. | 2726 // Disallow pushing of HTTPS content. |
| 2727 if (gurl.SchemeIs("https")) { | 2727 if (gurl.SchemeIs("https")) { |
| 2728 EnqueueResetStreamFrame( | 2728 EnqueueResetStreamFrame( |
| 2729 stream_id, | 2729 stream_id, |
| 2730 request_priority, | 2730 request_priority, |
| 2731 RST_STREAM_REFUSED_STREAM, | 2731 RST_STREAM_REFUSED_STREAM, |
| 2732 base::StringPrintf("Rejected push of Cross Origin HTTPS content %d", | 2732 base::StringPrintf("Rejected push of Cross Origin HTTPS content %d", |
| 2733 associated_stream_id)); | 2733 associated_stream_id)); |
| 2734 return false; | |
|
bengr
2015/12/29 18:02:33
Please explain this in much more detail. Update th
tbansal1
2015/12/30 00:00:52
Added CL description. This function is expected to
| |
| 2734 } | 2735 } |
| 2735 } else { | 2736 } else { |
| 2736 GURL associated_url(associated_it->second.stream->GetUrlFromHeaders()); | 2737 GURL associated_url(associated_it->second.stream->GetUrlFromHeaders()); |
| 2737 if (associated_url.GetOrigin() != gurl.GetOrigin()) { | 2738 if (associated_url.GetOrigin() != gurl.GetOrigin()) { |
| 2738 EnqueueResetStreamFrame( | 2739 EnqueueResetStreamFrame( |
| 2739 stream_id, | 2740 stream_id, |
| 2740 request_priority, | 2741 request_priority, |
| 2741 RST_STREAM_REFUSED_STREAM, | 2742 RST_STREAM_REFUSED_STREAM, |
| 2742 base::StringPrintf("Rejected Cross Origin Push Stream %d", | 2743 base::StringPrintf("Rejected Cross Origin Push Stream %d", |
| 2743 associated_stream_id)); | 2744 associated_stream_id)); |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3330 if (!queue->empty()) { | 3331 if (!queue->empty()) { |
| 3331 SpdyStreamId stream_id = queue->front(); | 3332 SpdyStreamId stream_id = queue->front(); |
| 3332 queue->pop_front(); | 3333 queue->pop_front(); |
| 3333 return stream_id; | 3334 return stream_id; |
| 3334 } | 3335 } |
| 3335 } | 3336 } |
| 3336 return 0; | 3337 return 0; |
| 3337 } | 3338 } |
| 3338 | 3339 |
| 3339 } // namespace net | 3340 } // namespace net |
| OLD | NEW |