| 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 2704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2715 // that is trusted explicitly via the --trusted-spdy-proxy switch. | 2715 // that is trusted explicitly via the --trusted-spdy-proxy switch. |
| 2716 if (trusted_spdy_proxy_.Equals(host_port_pair())) { | 2716 if (trusted_spdy_proxy_.Equals(host_port_pair())) { |
| 2717 // Disallow pushing of HTTPS content. | 2717 // Disallow pushing of HTTPS content. |
| 2718 if (gurl.SchemeIs("https")) { | 2718 if (gurl.SchemeIs("https")) { |
| 2719 EnqueueResetStreamFrame( | 2719 EnqueueResetStreamFrame( |
| 2720 stream_id, | 2720 stream_id, |
| 2721 request_priority, | 2721 request_priority, |
| 2722 RST_STREAM_REFUSED_STREAM, | 2722 RST_STREAM_REFUSED_STREAM, |
| 2723 base::StringPrintf("Rejected push of Cross Origin HTTPS content %d", | 2723 base::StringPrintf("Rejected push of Cross Origin HTTPS content %d", |
| 2724 associated_stream_id)); | 2724 associated_stream_id)); |
| 2725 return false; |
| 2725 } | 2726 } |
| 2726 } else { | 2727 } else { |
| 2727 GURL associated_url(associated_it->second.stream->GetUrlFromHeaders()); | 2728 GURL associated_url(associated_it->second.stream->GetUrlFromHeaders()); |
| 2728 if (associated_url.GetOrigin() != gurl.GetOrigin()) { | 2729 if (associated_url.GetOrigin() != gurl.GetOrigin()) { |
| 2729 EnqueueResetStreamFrame( | 2730 EnqueueResetStreamFrame( |
| 2730 stream_id, | 2731 stream_id, |
| 2731 request_priority, | 2732 request_priority, |
| 2732 RST_STREAM_REFUSED_STREAM, | 2733 RST_STREAM_REFUSED_STREAM, |
| 2733 base::StringPrintf("Rejected Cross Origin Push Stream %d", | 2734 base::StringPrintf("Rejected Cross Origin Push Stream %d", |
| 2734 associated_stream_id)); | 2735 associated_stream_id)); |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3321 if (!queue->empty()) { | 3322 if (!queue->empty()) { |
| 3322 SpdyStreamId stream_id = queue->front(); | 3323 SpdyStreamId stream_id = queue->front(); |
| 3323 queue->pop_front(); | 3324 queue->pop_front(); |
| 3324 return stream_id; | 3325 return stream_id; |
| 3325 } | 3326 } |
| 3326 } | 3327 } |
| 3327 return 0; | 3328 return 0; |
| 3328 } | 3329 } |
| 3329 | 3330 |
| 3330 } // namespace net | 3331 } // namespace net |
| OLD | NEW |