| 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 #include "PluginFilter.h" | 6 #include "PluginFilter.h" |
| 7 #include "PluginSettings.h" | 7 #include "PluginSettings.h" |
| 8 #include "PluginClass.h" | 8 #include "PluginClass.h" |
| 9 #include "PluginSystem.h" | 9 #include "PluginSystem.h" |
| 10 #include <WinInet.h> | 10 #include <WinInet.h> |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 QueryServiceFromClient(&httpNegotiate); | 294 QueryServiceFromClient(&httpNegotiate); |
| 295 // This fills the pszAdditionalHeaders with more headers. One of which is the
Referer header, which we need. | 295 // This fills the pszAdditionalHeaders with more headers. One of which is the
Referer header, which we need. |
| 296 // There doesn't seem to be any other way to get this header before the reques
t has been made. | 296 // There doesn't seem to be any other way to get this header before the reques
t has been made. |
| 297 HRESULT nativeHr = httpNegotiate ? httpNegotiate->BeginningTransaction(szURL,
szHeaders, dwReserved, pszAdditionalHeaders) : S_OK; | 297 HRESULT nativeHr = httpNegotiate ? httpNegotiate->BeginningTransaction(szURL,
szHeaders, dwReserved, pszAdditionalHeaders) : S_OK; |
| 298 | 298 |
| 299 if (pszAdditionalHeaders && *pszAdditionalHeaders) | 299 if (pszAdditionalHeaders && *pszAdditionalHeaders) |
| 300 { | 300 { |
| 301 m_boundDomain = ExtractHttpHeader<std::wstring>(*pszAdditionalHeaders, L"Ref
erer:", L"\n"); | 301 m_boundDomain = ExtractHttpHeader<std::wstring>(*pszAdditionalHeaders, L"Ref
erer:", L"\n"); |
| 302 } | 302 } |
| 303 m_boundDomain = TrimString(m_boundDomain); | 303 m_boundDomain = TrimString(m_boundDomain); |
| 304 m_contentType = GetContentType(ATL::CString(acceptHeader.c_str()), m_boundDoma
in, ToCString(src)); | 304 m_contentType = GetContentType(ATL::CString(acceptHeader.c_str()), m_boundDoma
in, src); |
| 305 CPluginTab* tab = CPluginClass::GetTab(::GetCurrentThreadId()); | 305 CPluginTab* tab = CPluginClass::GetTab(::GetCurrentThreadId()); |
| 306 CPluginClient* client = CPluginClient::GetInstance(); | 306 CPluginClient* client = CPluginClient::GetInstance(); |
| 307 | 307 |
| 308 if (tab && client) | 308 if (tab && client) |
| 309 { | 309 { |
| 310 std::wstring documentUrl = tab->GetDocumentUrl(); | 310 std::wstring documentUrl = tab->GetDocumentUrl(); |
| 311 // Page is identical to document => don't block | 311 // Page is identical to document => don't block |
| 312 if (documentUrl == src) | 312 if (documentUrl == src) |
| 313 { | 313 { |
| 314 return nativeHr; | 314 return nativeHr; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 } | 390 } |
| 391 | 391 |
| 392 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, m_spInterne
tProtocol); | 392 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, m_spInterne
tProtocol); |
| 393 } | 393 } |
| 394 | 394 |
| 395 STDMETHODIMP WBPassthru::Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [o
ut] */ ULONG *pcbRead) | 395 STDMETHODIMP WBPassthru::Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [o
ut] */ ULONG *pcbRead) |
| 396 { | 396 { |
| 397 WBPassthruSink* pSink = GetSink(); | 397 WBPassthruSink* pSink = GetSink(); |
| 398 return pSink->OnRead(pv, cb, pcbRead); | 398 return pSink->OnRead(pv, cb, pcbRead); |
| 399 } | 399 } |
| OLD | NEW |