| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 DEBUG_GENERAL(src); | 130 DEBUG_GENERAL(src); |
| 131 CPluginClient::UnescapeUrl(src); | 131 CPluginClient::UnescapeUrl(src); |
| 132 m_url = szUrl; | 132 m_url = szUrl; |
| 133 | 133 |
| 134 CString boundDomain; | 134 CString boundDomain; |
| 135 CString mimeType; | 135 CString mimeType; |
| 136 if (pOIBindInfo) | 136 if (pOIBindInfo) |
| 137 { | 137 { |
| 138 ULONG resLen = 0; | 138 ULONG resLen = 0; |
| 139 LPOLESTR mime = 0; | 139 LPOLESTR mime = 0; |
| 140 HRESULT hr = pOIBindInfo->GetBindString(BINDSTRING_ACCEPT_MIMES, &mime, 1, & resLen); | 140 pOIBindInfo->GetBindString(BINDSTRING_ACCEPT_MIMES, &mime, 1, &resLen); |
|
Felix Dahlke
2013/08/08 14:13:55
Just noticed that hr is unused here, we shouldn't
Felix Dahlke
2013/08/09 07:12:33
You haven't addressed this comment.
| |
| 141 if (mime && resLen > 0) | 141 if (mime && resLen > 0) |
| 142 { | 142 { |
| 143 mimeType.SetString(mime); | 143 mimeType.SetString(mime); |
| 144 } | 144 } |
| 145 LPOLESTR bindToObject = 0; | 145 LPOLESTR bindToObject = 0; |
| 146 hr = pOIBindInfo->GetBindString(BINDSTRING_FLAG_BIND_TO_OBJECT, &bindToObjec t, 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 hr = pOIBindInfo->GetBindString(BINDSTRING_XDR_ORIGIN, &domainRetrieved, 1 , &resLen); | 150 HRESULT hr = pOIBindInfo->GetBindString(BINDSTRING_XDR_ORIGIN, &domainRetr ieved, 1, &resLen); |
| 151 } | 151 if ((hr == S_OK) && domainRetrieved && (resLen > 0)) |
| 152 if ((hr == S_OK) && domainRetrieved && (resLen > 0)) | 152 { |
|
Felix Dahlke
2013/08/05 14:28:05
Shouldn't this be moved into the if as well? What
Oleksandr
2013/08/08 14:03:20
I might be missing something but we will not do an
Felix Dahlke
2013/08/08 14:13:55
Right, there's a check for domainRetrieved there,
Oleksandr
2013/08/08 14:22:21
Agreed.
On 2013/08/08 14:13:55, Felix H. Dahlke w
| |
| 153 { | 153 boundDomain.SetString(domainRetrieved); |
| 154 boundDomain.SetString(domainRetrieved); | 154 // Remove protocol |
| 155 // Remove protocol | 155 int pos = boundDomain.Find(L"://"); |
| 156 int pos = boundDomain.Find(L"://"); | 156 if (pos > 0) |
| 157 if (pos > 0) | 157 { |
| 158 { | 158 boundDomain = boundDomain.Mid(pos + 3); |
| 159 boundDomain = boundDomain.Mid(pos + 3); | 159 } |
| 160 } | 160 // Remove port |
| 161 // Remove port | 161 pos = boundDomain.Find(L":"); |
| 162 pos = boundDomain.Find(L":"); | 162 if (pos > 0) |
| 163 if (pos > 0) | 163 { |
| 164 { | 164 boundDomain.Left(pos); |
| 165 boundDomain.Left(pos); | 165 } |
| 166 } | 166 } |
| 167 } | 167 } |
| 168 } | 168 } |
| 169 | 169 |
| 170 CString cookie; | 170 CString cookie; |
| 171 ULONG len1 = 2048; | 171 ULONG len1 = 2048; |
| 172 ULONG len2 = 2048; | 172 ULONG len2 = 2048; |
| 173 | 173 |
| 174 #ifdef SUPPORT_FILTER | 174 #ifdef SUPPORT_FILTER |
| 175 int contentType = CFilter::contentTypeAny; | 175 int contentType = CFilter::contentTypeAny; |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 367 CComPtr<IHttpNegotiate> spHttpNegotiate; | 367 CComPtr<IHttpNegotiate> spHttpNegotiate; |
| 368 QueryServiceFromClient(&spHttpNegotiate); | 368 QueryServiceFromClient(&spHttpNegotiate); |
| 369 | 369 |
| 370 return spHttpNegotiate ? spHttpNegotiate->OnResponse(dwResponseCode, szRespons eHeaders, szRequestHeaders, pszAdditionalRequestHeaders) : S_OK; | 370 return spHttpNegotiate ? spHttpNegotiate->OnResponse(dwResponseCode, szRespons eHeaders, szRequestHeaders, pszAdditionalRequestHeaders) : S_OK; |
| 371 } | 371 } |
| 372 | 372 |
| 373 STDMETHODIMP WBPassthruSink::ReportProgress(ULONG ulStatusCode, LPCWSTR szStatus Text) | 373 STDMETHODIMP WBPassthruSink::ReportProgress(ULONG ulStatusCode, LPCWSTR szStatus Text) |
| 374 { | 374 { |
| 375 return m_spInternetProtocolSink ? m_spInternetProtocolSink->ReportProgress(ulS tatusCode, szStatusText) : S_OK; | 375 return m_spInternetProtocolSink ? m_spInternetProtocolSink->ReportProgress(ulS tatusCode, szStatusText) : S_OK; |
| 376 } | 376 } |
| LEFT | RIGHT |