Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/PluginWbPassThrough.cpp

Issue 29330053: Issue 3303 - Unescape request URL for ShouldBlock in WBPassthruSink::BeginningTransaction (Closed)
Patch Set: address comment Created Nov. 16, 2015, 9:56 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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, m_contentType, m_boundDomain, /*debug flag but mu st be set*/true))
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld