// This is the heuristic which detects the requests issued by Flash.ocx. // It turned out that the implementation from ''Flash.ocx'' (tested version is 15.0.0.152) // 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(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) { DWORD grfBINDF = 0; BINDINFO bindInfo = {}; bindInfo.cbSize = sizeof(bindInfo); if (SUCCEEDED(bscb->GetBindInfo(&grfBINDF, &bindInfo)) && (BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE| BINDF_PULLDATA) == grfBINDF && (BINDINFO_OPTIONS_ENABLE_UTF8 | BINDINFO_OPTIONS_USE_IE_ENCODING) == bindInfo.dwOptions ) { return true; } } return false; }