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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 mimeType.SetString(mime); | 143 mimeType.SetString(mime); |
144 } | 144 } |
145 LPOLESTR bindToObject = 0; | 145 LPOLESTR bindToObject = 0; |
146 pOIBindInfo->GetBindString(BINDSTRING_FLAG_BIND_TO_OBJECT, &bindToObject, 1,
&resLen); | 146 pOIBindInfo->GetBindString(BINDSTRING_FLAG_BIND_TO_OBJECT, &bindToObject, 1,
&resLen); |
147 LPOLESTR domainRetrieved = 0; | 147 LPOLESTR domainRetrieved = 0; |
148 if (resLen == 0 || wcscmp(bindToObject, L"FALSE") == 0) | 148 if (resLen == 0 || wcscmp(bindToObject, L"FALSE") == 0) |
149 { | 149 { |
150 HRESULT hr = pOIBindInfo->GetBindString(BINDSTRING_XDR_ORIGIN, &domainRetr
ieved, 1, &resLen); | 150 HRESULT hr = pOIBindInfo->GetBindString(BINDSTRING_XDR_ORIGIN, &domainRetr
ieved, 1, &resLen); |
151 if ((hr == S_OK) && domainRetrieved && (resLen > 0)) | 151 if ((hr == S_OK) && domainRetrieved && (resLen > 0)) |
152 { | 152 { |
153 boundDomain.SetString(domainRetrieved); | 153 boundDomain = CAdblockPlusClient::GetInstance()->GetHostFromUrl(domainRe
trieved).c_str(); |
154 // Remove protocol | |
155 int pos = boundDomain.Find(L"://"); | |
156 if (pos > 0) | |
157 { | |
158 boundDomain = boundDomain.Mid(pos + 3); | |
159 } | |
160 // Remove port | |
161 pos = boundDomain.Find(L":"); | |
162 if (pos > 0) | |
163 { | |
164 boundDomain.Left(pos); | |
165 } | |
166 } | 154 } |
167 } | 155 } |
168 } | 156 } |
169 | 157 |
170 CString cookie; | 158 CString cookie; |
171 ULONG len1 = 2048; | 159 ULONG len1 = 2048; |
172 ULONG len2 = 2048; | 160 ULONG len2 = 2048; |
173 | 161 |
174 #ifdef SUPPORT_FILTER | 162 #ifdef SUPPORT_FILTER |
175 int contentType = CFilter::contentTypeAny; | 163 int contentType = CFilter::contentTypeAny; |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 CComPtr<IHttpNegotiate> spHttpNegotiate; | 355 CComPtr<IHttpNegotiate> spHttpNegotiate; |
368 QueryServiceFromClient(&spHttpNegotiate); | 356 QueryServiceFromClient(&spHttpNegotiate); |
369 | 357 |
370 return spHttpNegotiate ? spHttpNegotiate->OnResponse(dwResponseCode, szRespons
eHeaders, szRequestHeaders, pszAdditionalRequestHeaders) : S_OK; | 358 return spHttpNegotiate ? spHttpNegotiate->OnResponse(dwResponseCode, szRespons
eHeaders, szRequestHeaders, pszAdditionalRequestHeaders) : S_OK; |
371 } | 359 } |
372 | 360 |
373 STDMETHODIMP WBPassthruSink::ReportProgress(ULONG ulStatusCode, LPCWSTR szStatus
Text) | 361 STDMETHODIMP WBPassthruSink::ReportProgress(ULONG ulStatusCode, LPCWSTR szStatus
Text) |
374 { | 362 { |
375 return m_spInternetProtocolSink ? m_spInternetProtocolSink->ReportProgress(ulS
tatusCode, szStatusText) : S_OK; | 363 return m_spInternetProtocolSink ? m_spInternetProtocolSink->ReportProgress(ulS
tatusCode, szStatusText) : S_OK; |
376 } | 364 } |
OLD | NEW |