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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 HRESULT hr = pOIBindInfo->GetBindString(BINDSTRING_ACCEPT_MIMES, &mime, 1, &
resLen); |
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 hr = pOIBindInfo->GetBindString(BINDSTRING_FLAG_BIND_TO_OBJECT, &bindToObjec
t, 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 hr = pOIBindInfo->GetBindString(BINDSTRING_XDR_ORIGIN, &domainRetrieved, 1
, &resLen); |
151 } | 151 if ((hr == S_OK) && domainRetrieved && (resLen > 0)) |
152 if ((hr == S_OK) && domainRetrieved && (resLen > 0)) | |
153 { | |
154 boundDomain.SetString(domainRetrieved); | |
155 // Remove protocol | |
156 int pos = boundDomain.Find(L"://"); | |
157 if (pos > 0) | |
158 { | 152 { |
159 boundDomain = boundDomain.Mid(pos + 3); | 153 boundDomain.SetString(domainRetrieved); |
160 } | 154 // Remove protocol |
161 // Remove port | 155 int pos = boundDomain.Find(L"://"); |
162 pos = boundDomain.Find(L":"); | 156 if (pos > 0) |
163 if (pos > 0) | 157 { |
164 { | 158 boundDomain = boundDomain.Mid(pos + 3); |
165 boundDomain.Left(pos); | 159 } |
| 160 // Remove port |
| 161 pos = boundDomain.Find(L":"); |
| 162 if (pos > 0) |
| 163 { |
| 164 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 } |
OLD | NEW |