OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
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 | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
364 cancelMainResourceLoad(ResourceError::cancelledError(newRequest.url( ))); | 364 cancelMainResourceLoad(ResourceError::cancelledError(newRequest.url( ))); |
365 return; | 365 return; |
366 } | 366 } |
367 timing()->addRedirect(redirectResponse.url(), newRequest.url()); | 367 timing()->addRedirect(redirectResponse.url(), newRequest.url()); |
368 } | 368 } |
369 | 369 |
370 // If we're fielding a redirect in response to a POST, force a load from ori gin, since | 370 // If we're fielding a redirect in response to a POST, force a load from ori gin, since |
371 // this is a common site technique to return to a page viewing some data tha t the POST | 371 // this is a common site technique to return to a page viewing some data tha t the POST |
372 // just modified. | 372 // just modified. |
373 if (newRequest.cachePolicy() == UseProtocolCachePolicy && isRedirectAfterPos t(newRequest, redirectResponse)) | 373 if (newRequest.cachePolicy() == UseProtocolCachePolicy && isRedirectAfterPos t(newRequest, redirectResponse)) |
374 newRequest.setCachePolicy(ReloadIgnoringCacheData); | 374 newRequest.setCachePolicy(ReloadBypassingCache); |
Nate Chapin
2014/06/04 16:43:56
We have used ReloadIgnoringCacheData as long as I
| |
375 | 375 |
376 // If this is a sub-frame, check for mixed content blocking against the top frame. | 376 // If this is a sub-frame, check for mixed content blocking against the top frame. |
377 if (m_frame->tree().parent()) { | 377 if (m_frame->tree().parent()) { |
378 // FIXME: This does not yet work with out-of-process iframes. | 378 // FIXME: This does not yet work with out-of-process iframes. |
379 Frame* top = m_frame->tree().top(); | 379 Frame* top = m_frame->tree().top(); |
380 if (top->isLocalFrame() && !toLocalFrame(top)->loader().mixedContentChec ker()->canRunInsecureContent(toLocalFrame(top)->document()->securityOrigin(), ne wRequest.url())) { | 380 if (top->isLocalFrame() && !toLocalFrame(top)->loader().mixedContentChec ker()->canRunInsecureContent(toLocalFrame(top)->document()->securityOrigin(), ne wRequest.url())) { |
381 cancelMainResourceLoad(ResourceError::cancelledError(newRequest.url( ))); | 381 cancelMainResourceLoad(ResourceError::cancelledError(newRequest.url( ))); |
382 return; | 382 return; |
383 } | 383 } |
384 } | 384 } |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
822 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume nt) | 822 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume nt) |
823 { | 823 { |
824 m_frame->loader().stopAllLoaders(); | 824 m_frame->loader().stopAllLoaders(); |
825 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url( ), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer ->encodingWasChosenByUser() : false, true); | 825 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url( ), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer ->encodingWasChosenByUser() : false, true); |
826 if (!source.isNull()) | 826 if (!source.isNull()) |
827 m_writer->appendReplacingData(source); | 827 m_writer->appendReplacingData(source); |
828 endWriting(m_writer.get()); | 828 endWriting(m_writer.get()); |
829 } | 829 } |
830 | 830 |
831 } // namespace WebCore | 831 } // namespace WebCore |
OLD | NEW |