OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013, Intel Corporation | 3 * Copyright (C) 2013, Intel Corporation |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 17 matching lines...) Expand all Loading... |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 #include "config.h" | 32 #include "config.h" |
33 #include "core/loader/DocumentThreadableLoader.h" | 33 #include "core/loader/DocumentThreadableLoader.h" |
34 | 34 |
35 #include "core/dom/Document.h" | 35 #include "core/dom/Document.h" |
36 #include "core/fetch/CrossOriginAccessControl.h" | 36 #include "core/fetch/CrossOriginAccessControl.h" |
37 #include "core/fetch/FetchRequest.h" | 37 #include "core/fetch/FetchRequest.h" |
38 #include "core/fetch/RawResource.h" | |
39 #include "core/fetch/Resource.h" | 38 #include "core/fetch/Resource.h" |
40 #include "core/fetch/ResourceFetcher.h" | 39 #include "core/fetch/ResourceFetcher.h" |
41 #include "core/frame/ContentSecurityPolicy.h" | 40 #include "core/frame/ContentSecurityPolicy.h" |
42 #include "core/frame/Frame.h" | 41 #include "core/frame/Frame.h" |
43 #include "core/inspector/InspectorInstrumentation.h" | 42 #include "core/inspector/InspectorInstrumentation.h" |
44 #include "core/loader/CrossOriginPreflightResultCache.h" | 43 #include "core/loader/CrossOriginPreflightResultCache.h" |
45 #include "core/loader/DocumentThreadableLoaderClient.h" | 44 #include "core/loader/DocumentThreadableLoaderClient.h" |
46 #include "core/loader/FrameLoader.h" | 45 #include "core/loader/FrameLoader.h" |
47 #include "core/loader/ThreadableLoaderClient.h" | 46 #include "core/loader/ThreadableLoaderClient.h" |
48 #include "platform/SharedBuffer.h" | 47 #include "platform/SharedBuffer.h" |
49 #include "platform/network/ResourceError.h" | |
50 #include "platform/network/ResourceRequest.h" | 48 #include "platform/network/ResourceRequest.h" |
51 #include "platform/weborigin/SchemeRegistry.h" | 49 #include "platform/weborigin/SchemeRegistry.h" |
52 #include "platform/weborigin/SecurityOrigin.h" | 50 #include "platform/weborigin/SecurityOrigin.h" |
53 #include "wtf/Assertions.h" | 51 #include "wtf/Assertions.h" |
54 | 52 |
55 namespace WebCore { | 53 namespace WebCore { |
56 | 54 |
57 void DocumentThreadableLoader::loadResourceSynchronously(Document* document, con
st ResourceRequest& request, ThreadableLoaderClient& client, const ThreadableLoa
derOptions& options) | 55 void DocumentThreadableLoader::loadResourceSynchronously(Document* document, con
st ResourceRequest& request, ThreadableLoaderClient& client, const ThreadableLoa
derOptions& options) |
58 { | 56 { |
59 // The loader will be deleted as soon as this function exits. | 57 // The loader will be deleted as soon as this function exits. |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 | 505 |
508 if (!(requestUrl.user().isEmpty() && requestUrl.pass().isEmpty())) { | 506 if (!(requestUrl.user().isEmpty() && requestUrl.pass().isEmpty())) { |
509 errorDescription = "The request was redirected to a URL ('" + requestUrl
.string() + "') containing userinfo, which is disallowed for cross-origin reques
ts."; | 507 errorDescription = "The request was redirected to a URL ('" + requestUrl
.string() + "') containing userinfo, which is disallowed for cross-origin reques
ts."; |
510 return false; | 508 return false; |
511 } | 509 } |
512 | 510 |
513 return true; | 511 return true; |
514 } | 512 } |
515 | 513 |
516 } // namespace WebCore | 514 } // namespace WebCore |
OLD | NEW |