libchromiumcontent/patches/030-resource_request_detail...

36 строки
1.6 KiB
Diff
Исходник Обычный вид История

diff --git a/content/public/browser/resource_request_details.cc b/content/public/browser/resource_request_details.cc
2017-01-19 10:09:21 +03:00
index 0e790b68..0b5140a 100644
--- a/content/public/browser/resource_request_details.cc
+++ b/content/public/browser/resource_request_details.cc
@@ -22,6 +22,10 @@ ResourceRequestDetails::ResourceRequestDetails(const net::URLRequest* request,
2017-01-19 10:09:21 +03:00
has_certificate(has_certificate),
ssl_cert_status(request->ssl_info().cert_status),
socket_address(request->GetSocketAddress()) {
+ if (request->response_info().headers.get())
+ headers = new net::HttpResponseHeaders(
+ request->response_info().headers->raw_headers());
+
const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
resource_type = info->GetResourceType();
2016-03-07 08:15:52 +03:00
http_response_code =
diff --git a/content/public/browser/resource_request_details.h b/content/public/browser/resource_request_details.h
2017-01-19 10:09:21 +03:00
index e54e2c0..d817176 100644
--- a/content/public/browser/resource_request_details.h
+++ b/content/public/browser/resource_request_details.h
@@ -10,6 +10,7 @@
#include "content/public/common/resource_type.h"
#include "net/base/host_port_pair.h"
#include "net/cert/cert_status_flags.h"
+#include "net/http/http_response_headers.h"
#include "net/url_request/url_request_status.h"
#include "url/gurl.h"
2016-03-07 08:15:52 +03:00
@@ -41,6 +42,7 @@ struct ResourceRequestDetails {
// HTTP response code. See HttpResponseHeaders::response_code().
// -1 if there are no response headers yet.
int http_response_code;
+ scoped_refptr<net::HttpResponseHeaders> headers;
};
// Details about a redirection of a resource request.