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/url_request/url_request_http_job.h" | 5 #include "net/url_request/url_request_http_job.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
941 | 941 |
942 const URLRequestContext* context = request_->context(); | 942 const URLRequestContext* context = request_->context(); |
943 | 943 |
944 if (result == OK) { | 944 if (result == OK) { |
945 if (transaction_ && transaction_->GetResponseInfo()) { | 945 if (transaction_ && transaction_->GetResponseInfo()) { |
946 SetProxyServer(transaction_->GetResponseInfo()->proxy_server); | 946 SetProxyServer(transaction_->GetResponseInfo()->proxy_server); |
947 } | 947 } |
948 scoped_refptr<HttpResponseHeaders> headers = GetResponseHeaders(); | 948 scoped_refptr<HttpResponseHeaders> headers = GetResponseHeaders(); |
949 | 949 |
950 if (headers) { | 950 if (headers) { |
951 void* iter = NULL; | 951 size_t iter = 0; |
952 std::string name; | 952 std::string name; |
953 std::string value; | 953 std::string value; |
954 bool invalid_header_values_in_rfc7230 = false; | 954 bool invalid_header_values_in_rfc7230 = false; |
955 while (headers->EnumerateHeaderLines(&iter, &name, &value)) { | 955 while (headers->EnumerateHeaderLines(&iter, &name, &value)) { |
956 if (!HttpUtil::IsValidHeaderValueRFC7230(value)) { | 956 if (!HttpUtil::IsValidHeaderValueRFC7230(value)) { |
957 invalid_header_values_in_rfc7230 = true; | 957 invalid_header_values_in_rfc7230 = true; |
958 break; | 958 break; |
959 } | 959 } |
960 } | 960 } |
961 UMA_HISTOGRAM_BOOLEAN( | 961 UMA_HISTOGRAM_BOOLEAN( |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 return override_response_headers_.get() ? | 1610 return override_response_headers_.get() ? |
1611 override_response_headers_.get() : | 1611 override_response_headers_.get() : |
1612 transaction_->GetResponseInfo()->headers.get(); | 1612 transaction_->GetResponseInfo()->headers.get(); |
1613 } | 1613 } |
1614 | 1614 |
1615 void URLRequestHttpJob::NotifyURLRequestDestroyed() { | 1615 void URLRequestHttpJob::NotifyURLRequestDestroyed() { |
1616 awaiting_callback_ = false; | 1616 awaiting_callback_ = false; |
1617 } | 1617 } |
1618 | 1618 |
1619 } // namespace net | 1619 } // namespace net |
OLD | NEW |