1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-08 04:49:12 +02:00

Check responseHeaders length before calling pop() (#1739)

This throws an error on Firefox when responseHeaders is 0-length
This commit is contained in:
dhowe 2016-06-20 21:28:40 +08:00 committed by Raymond Hill
parent 8c632db436
commit 77da1aabb3

View File

@ -2108,7 +2108,7 @@ var httpObserver = {
return;
}
if ( result.responseHeaders ) {
if ( result.responseHeaders && result.responseHeaders.length ) {
channel.setResponseHeader(
'Content-Security-Policy',
result.responseHeaders.pop().value,