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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
354 ResourceError error("net", timeoutError, resource()->url(), String()); | 354 ResourceError error("net", timeoutError, resource()->url(), String()); |
355 error.setIsTimeout(true); | 355 error.setIsTimeout(true); |
356 cancelWithError(error); | 356 cancelWithError(error); |
357 } | 357 } |
358 | 358 |
359 void DocumentThreadableLoader::preflightSuccess() | 359 void DocumentThreadableLoader::preflightSuccess() |
360 { | 360 { |
361 OwnPtr<ResourceRequest> actualRequest; | 361 OwnPtr<ResourceRequest> actualRequest; |
362 actualRequest.swap(m_actualRequest); | 362 actualRequest.swap(m_actualRequest); |
363 | 363 |
364 actualRequest->setHTTPOrigin(securityOrigin()->toString()); | 364 actualRequest->setHTTPOrigin(AtomicString(securityOrigin()->toString())); |
eseidel
2013/12/31 22:05:03
It seems securityOrigin might want a toAtomicStrin
Inactive
2013/12/31 22:47:25
Done.
| |
365 | 365 |
366 clearResource(); | 366 clearResource(); |
367 | 367 |
368 // It should be ok to skip the security check since we already asked about t he preflight request. | 368 // It should be ok to skip the security check since we already asked about t he preflight request. |
369 loadRequest(*actualRequest, SkipSecurityCheck); | 369 loadRequest(*actualRequest, SkipSecurityCheck); |
370 } | 370 } |
371 | 371 |
372 void DocumentThreadableLoader::preflightFailure(const String& url, const String& errorDescription) | 372 void DocumentThreadableLoader::preflightFailure(const String& url, const String& errorDescription) |
373 { | 373 { |
374 ResourceError error(errorDomainBlinkInternal, 0, url, errorDescription); | 374 ResourceError error(errorDomainBlinkInternal, 0, url, errorDescription); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
471 | 471 |
472 if (!(requestUrl.user().isEmpty() && requestUrl.pass().isEmpty())) { | 472 if (!(requestUrl.user().isEmpty() && requestUrl.pass().isEmpty())) { |
473 errorDescription = "The request was redirected to a URL ('" + requestUrl .string() + "') containing userinfo, which is disallowed for cross-origin reques ts."; | 473 errorDescription = "The request was redirected to a URL ('" + requestUrl .string() + "') containing userinfo, which is disallowed for cross-origin reques ts."; |
474 return false; | 474 return false; |
475 } | 475 } |
476 | 476 |
477 return true; | 477 return true; |
478 } | 478 } |
479 | 479 |
480 } // namespace WebCore | 480 } // namespace WebCore |
OLD | NEW |