Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix 'm3u-prune' and 'xml-prune' — XMLHttpRequest.prototype.send() #315

Closed
AdamWr opened this issue May 17, 2023 · 0 comments
Closed

Fix 'm3u-prune' and 'xml-prune' — XMLHttpRequest.prototype.send() #315

AdamWr opened this issue May 17, 2023 · 0 comments

Comments

@AdamWr
Copy link
Member

AdamWr commented May 17, 2023

It looks like that sometimes changes are not applied even if content is replaced, I suppose that it might be related to XMLHttpRequest.prototype.send which is not mocked.
This issue occurs here - AdguardTeam/AdguardFilters#151052

Using the same method/approach like in trusted-replace-xhr-response should fixes this issue.

@slavaleleka slavaleleka added the bug Something isn't working label May 17, 2023
@adguard-bot adguard-bot assigned slavaleleka and unassigned zzebrum May 17, 2023
@adguard-bot adguard-bot changed the title Fix 'm3u-prune' and 'xml-prune' — 'XMLHttpRequest.prototype.send' Fix 'm3u-prune' and 'xml-prune' — XMLHttpRequest.prototype.send() May 17, 2023
adguard pushed a commit that referenced this issue May 26, 2023
…end(). #315

Squashed commit of the following:

commit 90b00a9
Author: Adam Wróblewski <adam@adguard.com>
Date:   Fri May 26 19:55:40 2023 +0200

    Add a new line before the description tag

commit 4f639cb
Author: Adam Wróblewski <adam@adguard.com>
Date:   Fri May 26 15:27:04 2023 +0200

    Remove unnecessary file

commit 3a4301b
Merge: acc928a aee79e0
Author: Adam Wróblewski <adam@adguard.com>
Date:   Fri May 26 15:20:07 2023 +0200

    Merge branch 'master' into fix/AG-22258

commit acc928a
Author: Adam Wróblewski <adam@adguard.com>
Date:   Fri May 26 15:10:31 2023 +0200

    Update tests
    Revert changes in server.js

commit 8ffe30c
Author: Adam Wróblewski <adam@adguard.com>
Date:   Wed May 24 16:37:53 2023 +0200

    Update server.js to handle POST requests in specific tests
    Use shouldBePruned instead of shouldBePrevented
    Fix tests

commit f17a26c
Author: Adam Wróblewski <adam@adguard.com>
Date:   Mon May 22 20:49:34 2023 +0200

    Fix issue with pruning when addEventListener was used before calling send() method in m3u-prune and xml-prune
    Fix issue with "Cannot construct a Request with a Request object that has already been used" when request contains specified body
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants