OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
7 | 7 |
8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1270 context().dispatchDidFail(m_documentLoader, resource->identifier(), error); | 1270 context().dispatchDidFail(m_documentLoader, resource->identifier(), error); |
1271 } | 1271 } |
1272 | 1272 |
1273 void ResourceFetcher::willSendRequest(unsigned long identifier, ResourceRequest&
request, const ResourceResponse& redirectResponse, const FetchInitiatorInfo& in
itiatorInfo) | 1273 void ResourceFetcher::willSendRequest(unsigned long identifier, ResourceRequest&
request, const ResourceResponse& redirectResponse, const FetchInitiatorInfo& in
itiatorInfo) |
1274 { | 1274 { |
1275 context().dispatchWillSendRequest(m_documentLoader, identifier, request, red
irectResponse, initiatorInfo); | 1275 context().dispatchWillSendRequest(m_documentLoader, identifier, request, red
irectResponse, initiatorInfo); |
1276 } | 1276 } |
1277 | 1277 |
1278 void ResourceFetcher::didReceiveResponse(const Resource* resource, const Resourc
eResponse& response) | 1278 void ResourceFetcher::didReceiveResponse(const Resource* resource, const Resourc
eResponse& response) |
1279 { | 1279 { |
| 1280 MixedContentChecker::checkMixedPrivatePublic(frame(), response.remoteIPAddre
ss()); |
| 1281 |
1280 // If the response is fetched via ServiceWorker, the original URL of the res
ponse could be different from the URL of the request. | 1282 // If the response is fetched via ServiceWorker, the original URL of the res
ponse could be different from the URL of the request. |
1281 if (response.wasFetchedViaServiceWorker()) { | 1283 if (response.wasFetchedViaServiceWorker()) { |
1282 if (!canRequest(resource->type(), resource->resourceRequest(), response.
url(), resource->options(), false, FetchRequest::UseDefaultOriginRestrictionForT
ype)) { | 1284 if (!canRequest(resource->type(), resource->resourceRequest(), response.
url(), resource->options(), false, FetchRequest::UseDefaultOriginRestrictionForT
ype)) { |
1283 resource->loader()->cancel(); | 1285 resource->loader()->cancel(); |
1284 context().dispatchDidFail(m_documentLoader, resource->identifier(),
ResourceError(errorDomainBlinkInternal, 0, response.url().string(), "Unsafe atte
mpt to load URL " + response.url().elidedString() + " fetched by a ServiceWorker
.")); | 1286 context().dispatchDidFail(m_documentLoader, resource->identifier(),
ResourceError(errorDomainBlinkInternal, 0, response.url().string(), "Unsafe atte
mpt to load URL " + response.url().elidedString() + " fetched by a ServiceWorker
.")); |
1285 return; | 1287 return; |
1286 } | 1288 } |
1287 } | 1289 } |
1288 context().dispatchDidReceiveResponse(m_documentLoader, resource->identifier(
), response, resource->loader()); | 1290 context().dispatchDidReceiveResponse(m_documentLoader, resource->identifier(
), response, resource->loader()); |
1289 } | 1291 } |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1496 | 1498 |
1497 void ResourceFetcher::trace(Visitor* visitor) | 1499 void ResourceFetcher::trace(Visitor* visitor) |
1498 { | 1500 { |
1499 visitor->trace(m_document); | 1501 visitor->trace(m_document); |
1500 visitor->trace(m_loaders); | 1502 visitor->trace(m_loaders); |
1501 visitor->trace(m_multipartLoaders); | 1503 visitor->trace(m_multipartLoaders); |
1502 ResourceLoaderHost::trace(visitor); | 1504 ResourceLoaderHost::trace(visitor); |
1503 } | 1505 } |
1504 | 1506 |
1505 } | 1507 } |
OLD | NEW |