Left: | ||
Right: |
OLD | NEW |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
371 if (IsFlashRequest(pszAdditionalHeaders)) | 371 if (IsFlashRequest(pszAdditionalHeaders)) |
372 { | 372 { |
373 m_contentType = ContentType::CONTENT_TYPE_OBJECT_SUBREQUEST; | 373 m_contentType = ContentType::CONTENT_TYPE_OBJECT_SUBREQUEST; |
374 } | 374 } |
375 | 375 |
376 if (pszAdditionalHeaders && *pszAdditionalHeaders && IsXmlHttpRequest(*pszAddi tionalHeaders)) | 376 if (pszAdditionalHeaders && *pszAdditionalHeaders && IsXmlHttpRequest(*pszAddi tionalHeaders)) |
377 { | 377 { |
378 m_contentType = ContentType::CONTENT_TYPE_XMLHTTPREQUEST; | 378 m_contentType = ContentType::CONTENT_TYPE_XMLHTTPREQUEST; |
379 } | 379 } |
380 | 380 |
381 if (client->ShouldBlock(szURL, m_contentType, m_boundDomain, /*debug flag but must be set*/true)) | 381 if (client->ShouldBlock(src.c_str(), m_contentType, m_boundDomain, /*debug fla g but must be set*/true)) |
Eric
2015/11/14 18:11:25
The first argument for 'ShouldBlock' is "const std
sergei
2015/11/16 09:56:53
Good catch!
| |
382 { | 382 { |
383 // NOTE: Feeding custom HTML to Flash, instead of original object subrequest | 383 // NOTE: Feeding custom HTML to Flash, instead of original object subrequest |
384 // doesn't have much sense. It also can manifest in unwanted result | 384 // doesn't have much sense. It also can manifest in unwanted result |
385 // like video being blocked (See https://issues.adblockplus.org/ticket/1669) | 385 // like video being blocked (See https://issues.adblockplus.org/ticket/1669) |
386 // So we report blocked object subrequests as failed, not just empty HTML. | 386 // So we report blocked object subrequests as failed, not just empty HTML. |
387 m_isCustomResponse = m_contentType != ContentType::CONTENT_TYPE_OBJECT_SUBRE QUEST; | 387 m_isCustomResponse = m_contentType != ContentType::CONTENT_TYPE_OBJECT_SUBRE QUEST; |
388 return E_ABORT; | 388 return E_ABORT; |
389 } | 389 } |
390 return nativeHr; | 390 return nativeHr; |
391 } | 391 } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
436 } | 436 } |
437 | 437 |
438 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, m_spInterne tProtocol); | 438 return OnStart(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved, m_spInterne tProtocol); |
439 } | 439 } |
440 | 440 |
441 STDMETHODIMP WBPassthru::Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [o ut] */ ULONG *pcbRead) | 441 STDMETHODIMP WBPassthru::Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [o ut] */ ULONG *pcbRead) |
442 { | 442 { |
443 WBPassthruSink* pSink = GetSink(); | 443 WBPassthruSink* pSink = GetSink(); |
444 return pSink->OnRead(pv, cb, pcbRead); | 444 return pSink->OnRead(pv, cb, pcbRead); |
445 } | 445 } |
OLD | NEW |