| OLD | NEW |
| 1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
| 2 | 2 |
| 3 #include "PluginWbPassThrough.h" | 3 #include "PluginWbPassThrough.h" |
| 4 #include "PluginClient.h" | 4 #include "PluginClient.h" |
| 5 #include "PluginClientFactory.h" | 5 #include "PluginClientFactory.h" |
| 6 #ifdef SUPPORT_FILTER | 6 #ifdef SUPPORT_FILTER |
| 7 #include "PluginFilter.h" | 7 #include "PluginFilter.h" |
| 8 #endif | 8 #endif |
| 9 #include "PluginSettings.h" | 9 #include "PluginSettings.h" |
| 10 #include "PluginClass.h" | 10 #include "PluginClass.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 return INET_E_REDIRECT_FAILED; | 263 return INET_E_REDIRECT_FAILED; |
| 264 } | 264 } |
| 265 if (((contentType == CFilter::contentTypeScript))&& (isBlocked)) | 265 if (((contentType == CFilter::contentTypeScript))&& (isBlocked)) |
| 266 { | 266 { |
| 267 m_shouldBlock = true; | 267 m_shouldBlock = true; |
| 268 BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, pTa
rgetProtocol); | 268 BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, pTa
rgetProtocol); |
| 269 m_spInternetProtocolSink->ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE, L"t
ext/javascript"); | 269 m_spInternetProtocolSink->ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE, L"t
ext/javascript"); |
| 270 m_spInternetProtocolSink->ReportResult(INET_E_REDIRECTING, 301, L"data:"); | 270 m_spInternetProtocolSink->ReportResult(INET_E_REDIRECTING, 301, L"data:"); |
| 271 return INET_E_REDIRECT_FAILED; | 271 return INET_E_REDIRECT_FAILED; |
| 272 } | 272 } |
| 273 if (((contentType == CFilter::contentTypeXmlHttpRequest)) && (isBlocked)) |
| 274 { |
| 275 m_shouldBlock = true; |
| 276 BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, pTa
rgetProtocol); |
| 277 m_spInternetProtocolSink->ReportResult(INET_E_REDIRECTING, 301, L"data:"); |
| 278 return INET_E_REDIRECT_FAILED; |
| 279 } |
| 273 if ((isBlocked)) | 280 if ((isBlocked)) |
| 274 { | 281 { |
| 275 /* WCHAR tmp[256]; | |
| 276 wsprintf(tmp, L"URL: %s, domain: %s, mime: %s, type: %d", szUrl, boundDoma
in, mimeType, contentType); | |
| 277 MessageBox(NULL, tmp, L"", MB_OK); | |
| 278 contentType = GetContentType(mimeType, boundDomain, src); | |
| 279 */ | |
| 280 m_shouldBlock = true; | 282 m_shouldBlock = true; |
| 281 BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, pTa
rgetProtocol); | 283 BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, pTa
rgetProtocol); |
| 282 m_spInternetProtocolSink->ReportResult(S_FALSE, 0, L""); | 284 m_spInternetProtocolSink->ReportResult(S_FALSE, 0, L""); |
| 283 | 285 |
| 284 return INET_E_REDIRECT_FAILED; | 286 return INET_E_REDIRECT_FAILED; |
| 285 } | 287 } |
| 286 } | 288 } |
| 287 #endif // SUPPORT_FILTER | 289 #endif // SUPPORT_FILTER |
| 288 | 290 |
| 289 return isBlocked ? S_FALSE : BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInf
o, grfPI, dwReserved, pTargetProtocol); | 291 return isBlocked ? S_FALSE : BaseClass::OnStart(szUrl, pOIProtSink, pOIBindInf
o, grfPI, dwReserved, pTargetProtocol); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, | 396 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, |
| 395 dwReserved, m_spInternetProtocol); | 397 dwReserved, m_spInternetProtocol); |
| 396 } | 398 } |
| 397 | 399 |
| 398 STDMETHODIMP WBPassthru::Read( /* [in, out] */ void *pv,/* [in] */ ULONG cb,/*
[out] */ ULONG *pcbRead) | 400 STDMETHODIMP WBPassthru::Read( /* [in, out] */ void *pv,/* [in] */ ULONG cb,/*
[out] */ ULONG *pcbRead) |
| 399 { | 401 { |
| 400 | 402 |
| 401 WBPassthruSink* pSink = GetSink(); | 403 WBPassthruSink* pSink = GetSink(); |
| 402 return pSink->Read(pv, cb, pcbRead); | 404 return pSink->Read(pv, cb, pcbRead); |
| 403 } | 405 } |
| OLD | NEW |