| 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 #include "PluginFilter.h" | 6 #include "PluginFilter.h" |
| 7 #include "PluginSettings.h" | 7 #include "PluginSettings.h" |
| 8 #include "PluginClass.h" | 8 #include "PluginClass.h" |
| 9 #include "PluginSystem.h" | 9 #include "PluginSystem.h" |
| 10 #include <WinInet.h> | 10 #include <WinInet.h> |
| 11 #include "wtypes.h" | 11 #include "wtypes.h" |
| 12 #include "../shared/Utils.h" | 12 #include "../shared/Utils.h" |
| 13 | 13 |
| 14 namespace | 14 namespace |
| 15 { | 15 { |
| 16 std::string g_blockedByABPPage = "<!DOCTYPE html>" | 16 std::string g_blockedByABPPage = "<!DOCTYPE html>" |
| 17 "<html>" | 17 "<html>" |
| 18 "<body>" | 18 "<body>" |
| 19 "<!-- blocked by AdblockPlus -->" | 19 "<!-- blocked by AdblockPlus -->" |
| 20 "</body>" | 20 "</body>" |
| 21 "</html>"; | 21 "</html>"; |
| 22 | 22 |
| 23 template <class T> | 23 template <class T> |
| 24 T ExtractHttpHeader(const T& allHeaders, const T& targetHeaderName, const T& d
elimiter) | 24 T ExtractHttpHeader(const T& allHeaders, const T& targetHeaderNameWithColon, c
onst T& delimiter) |
| 25 { | 25 { |
| 26 auto targetHeaderBeginsAt = allHeaders.find(targetHeaderName); | 26 auto targetHeaderBeginsAt = allHeaders.find(targetHeaderNameWithColon); |
| 27 if (targetHeaderBeginsAt == T::npos) | 27 if (targetHeaderBeginsAt == T::npos) |
| 28 { | 28 { |
| 29 return T(); | 29 return T(); |
| 30 } | 30 } |
| 31 targetHeaderBeginsAt += targetHeaderName.length(); | 31 targetHeaderBeginsAt += targetHeaderNameWithColon.length(); |
| 32 auto targetHeaderEndsAt = allHeaders.find(delimiter, targetHeaderBeginsAt); | 32 auto targetHeaderEndsAt = allHeaders.find(delimiter, targetHeaderBeginsAt); |
| 33 if (targetHeaderEndsAt == T::npos) | 33 if (targetHeaderEndsAt == T::npos) |
| 34 { | 34 { |
| 35 return T(); | 35 return T(); |
| 36 } | 36 } |
| 37 return allHeaders.substr(targetHeaderBeginsAt, targetHeaderEndsAt - targetHe
aderBeginsAt); | 37 return allHeaders.substr(targetHeaderBeginsAt, targetHeaderEndsAt - targetHe
aderBeginsAt); |
| 38 } | 38 } |
| 39 | 39 |
| 40 std::string ExtractHttpAcceptHeader(IInternetProtocol* internetProtocol) | 40 std::string ExtractHttpAcceptHeader(IInternetProtocol* internetProtocol) |
| 41 { | 41 { |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 | 375 |
| 376 STDMETHODIMP WBPassthru::LockRequest(/* [in] */ DWORD options) | 376 STDMETHODIMP WBPassthru::LockRequest(/* [in] */ DWORD options) |
| 377 { | 377 { |
| 378 return BaseClass::LockRequest(options); | 378 return BaseClass::LockRequest(options); |
| 379 } | 379 } |
| 380 | 380 |
| 381 STDMETHODIMP WBPassthru::UnlockRequest() | 381 STDMETHODIMP WBPassthru::UnlockRequest() |
| 382 { | 382 { |
| 383 return BaseClass::UnlockRequest(); | 383 return BaseClass::UnlockRequest(); |
| 384 } | 384 } |
| LEFT | RIGHT |