OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
84 request.setFirstPartyForCookies(request.url()); | 84 request.setFirstPartyForCookies(request.url()); |
85 else | 85 else |
86 request.setFirstPartyForCookies(m_frame->tree().top()->document()->first PartyForCookies()); | 86 request.setFirstPartyForCookies(m_frame->tree().top()->document()->first PartyForCookies()); |
87 | 87 |
88 // The remaining modifications are only necessary for HTTP and HTTPS. | 88 // The remaining modifications are only necessary for HTTP and HTTPS. |
89 if (!request.url().isEmpty() && !request.url().protocolIsInHTTPFamily()) | 89 if (!request.url().isEmpty() && !request.url().protocolIsInHTTPFamily()) |
90 return; | 90 return; |
91 | 91 |
92 m_frame->loader().applyUserAgent(request); | 92 m_frame->loader().applyUserAgent(request); |
93 | 93 |
94 if (request.cachePolicy() == ReloadIgnoringCacheData) { | 94 if (request.cachePolicy() == ReloadIgnoringCacheData |
ppi
2014/06/01 23:57:04
Is this going away with patches 4/5?
clamy
2014/06/02 05:54:47
Yes with patch 4. Patch 5 will remove some special
| |
95 || request.cachePolicy() == ReloadBypassingCache) { | |
95 if (m_frame->loader().loadType() == FrameLoadTypeReload) { | 96 if (m_frame->loader().loadType() == FrameLoadTypeReload) { |
96 request.setHTTPHeaderField("Cache-Control", "max-age=0"); | 97 request.setHTTPHeaderField("Cache-Control", "max-age=0"); |
97 } else if (m_frame->loader().loadType() == FrameLoadTypeReloadFromOrigin ) { | 98 } else if (m_frame->loader().loadType() == FrameLoadTypeReloadFromOrigin ) { |
98 request.setHTTPHeaderField("Cache-Control", "no-cache"); | 99 request.setHTTPHeaderField("Cache-Control", "no-cache"); |
99 request.setHTTPHeaderField("Pragma", "no-cache"); | 100 request.setHTTPHeaderField("Pragma", "no-cache"); |
100 } | 101 } |
101 } | 102 } |
102 | 103 |
103 if (isMainResource) | 104 if (isMainResource) |
104 request.setHTTPAccept(defaultAcceptHeader); | 105 request.setHTTPAccept(defaultAcceptHeader); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
209 if (!response.isNull()) | 210 if (!response.isNull()) |
210 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response); | 211 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response); |
211 | 212 |
212 if (dataLength > 0) | 213 if (dataLength > 0) |
213 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength, 0); | 214 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength, 0); |
214 | 215 |
215 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0, 0); | 216 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0, 0); |
216 } | 217 } |
217 | 218 |
218 } // namespace WebCore | 219 } // namespace WebCore |
OLD | NEW |