Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/plugin/PluginWbPassThrough.cpp

Issue 5506777797885952: Issue 1530 - Improve detecting of subrequest issued by flash addon (Closed)
Patch Set: remove changes for another issue Created Nov. 13, 2014, 8:43 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/plugin/PluginWbPassThrough.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginWbPassThrough.cpp
===================================================================
--- a/src/plugin/PluginWbPassThrough.cpp
+++ b/src/plugin/PluginWbPassThrough.cpp
@@ -243,8 +243,16 @@
// returns quite minimal configuration in comparison with the implementation from Microsofts'
// libraries (see grfBINDF and bindInfo.dwOptions). The impl from MS often includes something
// else.
-bool WBPassthruSink::IsFlashRequest()
+bool WBPassthruSink::IsFlashRequest(const wchar_t* const* additionalHeaders)
{
+ if (additionalHeaders && *additionalHeaders)
+ {
+ auto flashVersionHeader = ExtractHttpHeader<std::wstring>(*additionalHeaders, L"x-flash-version:", L"\n");
+ if (!TrimString(flashVersionHeader).empty())
+ {
+ return true;
+ }
+ }
ATL::CComPtr<IBindStatusCallback> bscb;
if (SUCCEEDED(QueryServiceFromClient(&bscb)) && !!bscb)
{
@@ -281,9 +289,9 @@
// There doesn't seem to be any other way to get this header before the request has been made.
HRESULT nativeHr = httpNegotiate ? httpNegotiate->BeginningTransaction(szURL, szHeaders, dwReserved, pszAdditionalHeaders) : S_OK;
- if (*pszAdditionalHeaders != 0)
+ if (pszAdditionalHeaders && *pszAdditionalHeaders)
{
- m_boundDomain = ExtractHttpHeader<std::wstring>(*pszAdditionalHeaders, L"Referer:", L"\n").c_str();
+ m_boundDomain = ExtractHttpHeader<std::wstring>(*pszAdditionalHeaders, L"Referer:", L"\n");
}
m_boundDomain = TrimString(m_boundDomain);
CPluginTab* tab = CPluginClass::GetTab(::GetCurrentThreadId());
@@ -306,7 +314,7 @@
}
}
- if (IsFlashRequest())
+ if (IsFlashRequest(pszAdditionalHeaders))
{
m_contentType = CFilter::EContentType::contentTypeObjectSubrequest;
}
« no previous file with comments | « src/plugin/PluginWbPassThrough.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld