diff --git a/Gemfile b/Gemfile index 342f6ec61e..a80dab5fe4 100644 --- a/Gemfile +++ b/Gemfile @@ -171,6 +171,7 @@ end group :test do gem 'pdf-reader' + gem 'puffing-billy' gem 'rails-controller-testing' gem 'simplecov', require: false gem 'simplecov-lcov', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 321fcbd450..b42743cb50 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -230,6 +230,7 @@ GEM ruby-rc4 (>= 0.1.5) concurrent-ruby (1.3.1) connection_pool (2.4.1) + cookiejar (0.3.4) crack (1.0.0) bigdecimal rexml @@ -269,11 +270,24 @@ GEM digest (3.1.1) docile (1.4.0) dotenv (3.1.2) + em-http-request (1.1.7) + addressable (>= 2.3.4) + cookiejar (!= 0.3.1) + em-socksify (>= 0.3) + eventmachine (>= 1.0.3) + http_parser.rb (>= 0.6.0) + em-socksify (0.3.3) + base64 + eventmachine (>= 1.0.0.beta.4) + em-synchrony (1.0.6) + eventmachine (>= 1.0.0.beta.1) email_validator (2.2.4) activemodel erubi (1.12.0) et-orbi (1.2.7) tzinfo + eventmachine (1.2.7) + eventmachine_httpserver (0.2.1) excon (0.81.0) execjs (2.7.0) factory_bot (6.2.0) @@ -347,6 +361,7 @@ GEM hashie (5.0.0) highline (2.0.3) htmlentities (4.3.4) + http_parser.rb (0.8.0) i18n (1.14.5) concurrent-ruby (~> 1.0) i18n-js (3.9.2) @@ -527,6 +542,14 @@ GEM psych (5.1.2) stringio public_suffix (5.0.5) + puffing-billy (4.0.2) + addressable (~> 2.5) + em-http-request (~> 1.1, >= 1.1.0) + em-synchrony + eventmachine (~> 1.2) + eventmachine_httpserver + http_parser.rb (~> 0.8.0) + multi_json puma (6.5.0) nio4r (~> 2.0) query_count (1.1.1) @@ -961,6 +984,7 @@ DEPENDENCIES pg (~> 1.2.3) private_address_check pry (~> 0.13.0) + puffing-billy puma query_count rack-mini-profiler (< 3.0.0) diff --git a/spec/fixtures/vcr_cassettes/Testing_external_scripts_loaded_in_the_browser/handles_HTTPS.yml b/spec/fixtures/vcr_cassettes/Testing_external_scripts_loaded_in_the_browser/handles_HTTPS.yml new file mode 100644 index 0000000000..7113b497f5 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Testing_external_scripts_loaded_in_the_browser/handles_HTTPS.yml @@ -0,0 +1,667 @@ +--- +http_interactions: +- request: + method: get + uri: http://deb.debian.org/favicon.ico + body: + encoding: UTF-8 + string: '' + headers: + Proxy-Connection: + - keep-alive + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Accept: + - image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + Connection: + - close + response: + status: + code: 404 + message: Not Found + headers: + Connection: + - close + Content-Length: + - '260' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + Content-Type: + - text/html; charset=iso-8859-1 + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_static_backend + Accept-Ranges: + - bytes + Age: + - '0' + Date: + - Wed, 30 Jul 2025 02:22:26 GMT + Via: + - 1.1 varnish + X-Served-By: + - cache-syd10162-SYD + X-Cache: + - MISS + X-Cache-Hits: + - '0' + X-Timer: + - S1753842146.721877,VS0,VE615 + X-Req-Url: + - recv="/favicon.ico",deliver="/favicon.ico" + body: + encoding: UTF-8 + string: | + + + 404 Not Found + +

Not Found

+

The requested URL was not found on this server.

+
+
Apache Server at deb.debian.org Port 80
+ + recorded_at: Wed, 30 Jul 2025 02:22:27 GMT +- request: + method: get + uri: https://deb.debian.org/icons/compressed.gif + body: + encoding: UTF-8 + string: '' + headers: + Connection: + - close + Sec-Ch-Ua-Platform: + - '"Linux"' + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Sec-Ch-Ua: + - '"Not)A;Brand";v="8", "Chromium";v="138"' + Sec-Ch-Ua-Mobile: + - "?0" + Accept: + - image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 + Sec-Fetch-Site: + - same-origin + Sec-Fetch-Mode: + - no-cors + Sec-Fetch-Dest: + - image + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + response: + status: + code: 200 + message: OK + headers: + Connection: + - close + Content-Length: + - '1038' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + Last-Modified: + - Sat, 20 Nov 2004 20:16:24 GMT + Etag: + - '"40e-3e9564c23b600"' + X-Clacks-Overhead: + - GNU Terry Pratchett + Content-Type: + - image/gif + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_static_backend + Accept-Ranges: + - bytes + Date: + - Wed, 30 Jul 2025 02:22:27 GMT + Via: + - 1.1 varnish + Age: + - '2' + X-Served-By: + - cache-syd10139-SYD + X-Cache: + - HIT + X-Cache-Hits: + - '1' + X-Timer: + - S1753842148.531974,VS0,VE1 + X-Req-Url: + - recv="/icons/compressed.gif",deliver="/icons/compressed.gif" + body: + encoding: ASCII-8BIT + string: !binary |- + R0lGODlhFAAWAOcAAP//////zP//mf//Zv//M///AP/M///MzP/Mmf/MZv/MM//MAP+Z//+ZzP+Zmf+ZZv+ZM/+ZAP9m//9mzP9mmf9mZv9mM/9mAP8z//8zzP8zmf8zZv8zM/8zAP8A//8AzP8Amf8AZv8AM/8AAMz//8z/zMz/mcz/Zsz/M8z/AMzM/8zMzMzMmczMZszMM8zMAMyZ/8yZzMyZmcyZZsyZM8yZAMxm/8xmzMxmmcxmZsxmM8xmAMwz/8wzzMwzmcwzZswzM8wzAMwA/8wAzMwAmcwAZswAM8wAAJn//5n/zJn/mZn/Zpn/M5n/AJnM/5nMzJnMmZnMZpnMM5nMAJmZ/5mZzJmZmZmZZpmZM5mZAJlm/5lmzJlmmZlmZplmM5lmAJkz/5kzzJkzmZkzZpkzM5kzAJkA/5kAzJkAmZkAZpkAM5kAAGb//2b/zGb/mWb/Zmb/M2b/AGbM/2bMzGbMmWbMZmbMM2bMAGaZ/2aZzGaZmWaZZmaZM2aZAGZm/2ZmzGZmmWZmZmZmM2ZmAGYz/2YzzGYzmWYzZmYzM2YzAGYA/2YAzGYAmWYAZmYAM2YAADP//zP/zDP/mTP/ZjP/MzP/ADPM/zPMzDPMmTPMZjPMMzPMADOZ/zOZzDOZmTOZZjOZMzOZADNm/zNmzDNmmTNmZjNmMzNmADMz/zMzzDMzmTMzZjMzMzMzADMA/zMAzDMAmTMAZjMAMzMAAAD//wD/zAD/mQD/ZgD/MwD/AADM/wDMzADMmQDMZgDMMwDMAACZ/wCZzACZmQCZZgCZMwCZAABm/wBmzABmmQBmZgBmMwBmAAAz/wAzzAAzmQAzZgAzMwAzAAAA/wAAzAAAmQAAZgAAM+4AAN0AALsAAKoAAIgAAHcAAFUAAEQAACIAABEAAADuAADdAAC7AACqAACIAAB3AABVAABEAAAiAAARAAAA7gAA3QAAuwAAqgAAiAAAdwAAVQAARAAAIgAAEe7u7t3d3bu7u6qqqoiIiHd3d1VVVURERCIiIhEREQAAACH+TlRoaXMgYXJ0IGlzIGluIHRoZSBwdWJsaWMgZG9tYWluLiBLZXZpbiBIdWdoZXMsIGtldmluaEBlaXQuY29tLCBTZXB0ZW1iZXIgMTk5NQAh+QQBAAAkACwAAAAAFAAWAAAImQBJCCTBqmDBgQgTDmQFAABDVgojEmzI0KHEhBUrWrwoMGNDihwnAvjHiqRJjhX/qVz5D+VHAFZiWmmZ8BGHji9hxqTJ4ZFAmzc1vpxJgkPPn0Y5CP04M6lPEkCN5mxoJelRqFY5TM36NGrPqV67Op0KM6rYnkup/gMq1mdamC1tdn36lijUpwjr0pSoFyUrmTJLhiTBkqXCgAA7 + recorded_at: Wed, 30 Jul 2025 02:22:27 GMT +- request: + method: get + uri: https://deb.debian.org/icons/blank.gif + body: + encoding: UTF-8 + string: '' + headers: + Connection: + - close + Sec-Ch-Ua-Platform: + - '"Linux"' + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Sec-Ch-Ua: + - '"Not)A;Brand";v="8", "Chromium";v="138"' + Sec-Ch-Ua-Mobile: + - "?0" + Accept: + - image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 + Sec-Fetch-Site: + - same-origin + Sec-Fetch-Mode: + - no-cors + Sec-Fetch-Dest: + - image + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + response: + status: + code: 200 + message: OK + headers: + Connection: + - close + Content-Length: + - '148' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + Last-Modified: + - Sat, 20 Nov 2004 20:16:24 GMT + Etag: + - '"94-3e9564c23b600"' + X-Clacks-Overhead: + - GNU Terry Pratchett + Content-Type: + - image/gif + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_static_backend + Accept-Ranges: + - bytes + Date: + - Wed, 30 Jul 2025 02:22:27 GMT + Via: + - 1.1 varnish + Age: + - '3' + X-Served-By: + - cache-syd10176-SYD + X-Cache: + - HIT + X-Cache-Hits: + - '1' + X-Timer: + - S1753842148.541864,VS0,VE1 + X-Req-Url: + - recv="/icons/blank.gif",deliver="/icons/blank.gif" + body: + encoding: ASCII-8BIT + string: !binary |- + R0lGODlhFAAWAKEAAP///8z//wAAAAAAACH+TlRoaXMgYXJ0IGlzIGluIHRoZSBwdWJsaWMgZG9tYWluLiBLZXZpbiBIdWdoZXMsIGtldmluaEBlaXQuY29tLCBTZXB0ZW1iZXIgMTk5NQAh+QQBAAABACwAAAAAFAAWAAACE4yPqcvtD6OctNqLs968+w+GSQEAOw== + recorded_at: Wed, 30 Jul 2025 02:22:27 GMT +- request: + method: get + uri: https://deb.debian.org/icons/back.gif + body: + encoding: UTF-8 + string: '' + headers: + Connection: + - close + Sec-Ch-Ua-Platform: + - '"Linux"' + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Sec-Ch-Ua: + - '"Not)A;Brand";v="8", "Chromium";v="138"' + Sec-Ch-Ua-Mobile: + - "?0" + Accept: + - image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 + Sec-Fetch-Site: + - same-origin + Sec-Fetch-Mode: + - no-cors + Sec-Fetch-Dest: + - image + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + response: + status: + code: 200 + message: OK + headers: + Connection: + - close + Content-Length: + - '216' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + Last-Modified: + - Sat, 20 Nov 2004 20:16:24 GMT + Etag: + - '"d8-3e9564c23b600"' + X-Clacks-Overhead: + - GNU Terry Pratchett + Content-Type: + - image/gif + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_static_backend + Accept-Ranges: + - bytes + Date: + - Wed, 30 Jul 2025 02:22:27 GMT + Via: + - 1.1 varnish + Age: + - '3' + X-Served-By: + - cache-syd10161-SYD + X-Cache: + - HIT + X-Cache-Hits: + - '1' + X-Timer: + - S1753842148.542278,VS0,VE1 + X-Req-Url: + - recv="/icons/back.gif",deliver="/icons/back.gif" + body: + encoding: ASCII-8BIT + string: !binary |- + R0lGODlhFAAWAMIAAP///8z//5mZmWZmZjMzMwAAAAAAAAAAACH+TlRoaXMgYXJ0IGlzIGluIHRoZSBwdWJsaWMgZG9tYWluLiBLZXZpbiBIdWdoZXMsIGtldmluaEBlaXQuY29tLCBTZXB0ZW1iZXIgMTk5NQAh+QQBAAABACwAAAAAFAAWAAADSxi63P4jEPJqEDNTu6LO3PVpnDdOFnaCkHQGBTcqRRxuWG0v+5LrNUZQ8QPqeMakkaZsFihOpyDajMCoOoJAGNVWkt7QVfzokc+LBAA7 + recorded_at: Wed, 30 Jul 2025 02:22:27 GMT +- request: + method: get + uri: https://deb.debian.org/icons/hand.right.gif + body: + encoding: UTF-8 + string: '' + headers: + Connection: + - close + Sec-Ch-Ua-Platform: + - '"Linux"' + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Sec-Ch-Ua: + - '"Not)A;Brand";v="8", "Chromium";v="138"' + Sec-Ch-Ua-Mobile: + - "?0" + Accept: + - image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 + Sec-Fetch-Site: + - same-origin + Sec-Fetch-Mode: + - no-cors + Sec-Fetch-Dest: + - image + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + response: + status: + code: 200 + message: OK + headers: + Connection: + - close + Content-Length: + - '217' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + Last-Modified: + - Sat, 20 Nov 2004 20:16:24 GMT + Etag: + - '"d9-3e9564c23b600"' + X-Clacks-Overhead: + - GNU Terry Pratchett + Content-Type: + - image/gif + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_static_backend + Accept-Ranges: + - bytes + Date: + - Wed, 30 Jul 2025 02:22:27 GMT + Via: + - 1.1 varnish + Age: + - '3' + X-Served-By: + - cache-syd10121-SYD + X-Cache: + - HIT + X-Cache-Hits: + - '1' + X-Timer: + - S1753842148.542101,VS0,VE1 + X-Req-Url: + - recv="/icons/hand.right.gif",deliver="/icons/hand.right.gif" + body: + encoding: ASCII-8BIT + string: !binary |- + R0lGODlhFAAWAMIAAP/////Mmcz//5lmMwAAAAAAAAAAAAAAACH+TlRoaXMgYXJ0IGlzIGluIHRoZSBwdWJsaWMgZG9tYWluLiBLZXZpbiBIdWdoZXMsIGtldmluaEBlaXQuY29tLCBTZXB0ZW1iZXIgMTk5NQAh+QQBAAACACwAAAAAFAAWAAADTCi63P4wykkdubiSwDuRVydi5CWEYjBsKbe2rDjMdMwRw1iaaZx7jcDm8nOpVsFjsSh0CFuq46fxko0eKOtsiu0UuRHfVlOqmM9oSgIAOw== + recorded_at: Wed, 30 Jul 2025 02:22:27 GMT +- request: + method: get + uri: https://deb.debian.org/icons/unknown.gif + body: + encoding: UTF-8 + string: '' + headers: + Connection: + - close + Sec-Ch-Ua-Platform: + - '"Linux"' + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Sec-Ch-Ua: + - '"Not)A;Brand";v="8", "Chromium";v="138"' + Sec-Ch-Ua-Mobile: + - "?0" + Accept: + - image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 + Sec-Fetch-Site: + - same-origin + Sec-Fetch-Mode: + - no-cors + Sec-Fetch-Dest: + - image + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + response: + status: + code: 200 + message: OK + headers: + Connection: + - close + Content-Length: + - '245' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + Last-Modified: + - Sat, 20 Nov 2004 20:16:24 GMT + Etag: + - '"f5-3e9564c23b600"' + X-Clacks-Overhead: + - GNU Terry Pratchett + Content-Type: + - image/gif + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_static_backend + Accept-Ranges: + - bytes + Date: + - Wed, 30 Jul 2025 02:22:27 GMT + Via: + - 1.1 varnish + Age: + - '3' + X-Served-By: + - cache-syd10172-SYD + X-Cache: + - HIT + X-Cache-Hits: + - '1' + X-Timer: + - S1753842148.542293,VS0,VE1 + X-Req-Url: + - recv="/icons/unknown.gif",deliver="/icons/unknown.gif" + body: + encoding: ASCII-8BIT + string: !binary |- + R0lGODlhFAAWAMIAAP///8z//5mZmTMzMwAAAAAAAAAAAAAAACH+TlRoaXMgYXJ0IGlzIGluIHRoZSBwdWJsaWMgZG9tYWluLiBLZXZpbiBIdWdoZXMsIGtldmluaEBlaXQuY29tLCBTZXB0ZW1iZXIgMTk5NQAh+QQBAAABACwAAAAAFAAWAAADaDi6vPEwDECrnSO+aTvPEQcIAmGaIrhR5XmKgMq1LkoMN7ECrjDWp52r0iPpJJ0KjUAq7SxLE+sI+9V8vycFiM0iLb2O80s8JcfVJJTaGYrZYPNby5Ov6WolPD+XDJqAgSQ4EUCGQQEJADs= + recorded_at: Wed, 30 Jul 2025 02:22:27 GMT +- request: + method: get + uri: https://deb.debian.org/icons/text.gif + body: + encoding: UTF-8 + string: '' + headers: + Connection: + - close + Sec-Ch-Ua-Platform: + - '"Linux"' + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Sec-Ch-Ua: + - '"Not)A;Brand";v="8", "Chromium";v="138"' + Sec-Ch-Ua-Mobile: + - "?0" + Accept: + - image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 + Sec-Fetch-Site: + - same-origin + Sec-Fetch-Mode: + - no-cors + Sec-Fetch-Dest: + - image + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + response: + status: + code: 200 + message: OK + headers: + Connection: + - close + Content-Length: + - '229' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + Last-Modified: + - Sat, 20 Nov 2004 20:16:24 GMT + Etag: + - '"e5-3e9564c23b600"' + X-Clacks-Overhead: + - GNU Terry Pratchett + Content-Type: + - image/gif + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_static_backend + Accept-Ranges: + - bytes + Date: + - Wed, 30 Jul 2025 02:22:27 GMT + Via: + - 1.1 varnish + Age: + - '3' + X-Served-By: + - cache-syd10120-SYD + X-Cache: + - HIT + X-Cache-Hits: + - '1' + X-Timer: + - S1753842148.541994,VS0,VE1 + X-Req-Url: + - recv="/icons/text.gif",deliver="/icons/text.gif" + body: + encoding: ASCII-8BIT + string: !binary |- + R0lGODlhFAAWAMIAAP///8z//5mZmTMzMwAAAAAAAAAAAAAAACH+TlRoaXMgYXJ0IGlzIGluIHRoZSBwdWJsaWMgZG9tYWluLiBLZXZpbiBIdWdoZXMsIGtldmluaEBlaXQuY29tLCBTZXB0ZW1iZXIgMTk5NQAh+QQBAAABACwAAAAAFAAWAAADWDi6vPEwDECrnSO+aTvPEddVIriN1wVxROtSxBDPJwq7bo23luALhJqt8gtKbrsXBSgcEo2spBLAPDp7UKT02bxWRdrp94rtbpdZMrrr/A5+8LhPFpHajQkAOw== + recorded_at: Wed, 30 Jul 2025 02:22:27 GMT +- request: + method: get + uri: https://deb.debian.org/icons/folder.gif + body: + encoding: UTF-8 + string: '' + headers: + Connection: + - close + Sec-Ch-Ua-Platform: + - '"Linux"' + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Sec-Ch-Ua: + - '"Not)A;Brand";v="8", "Chromium";v="138"' + Sec-Ch-Ua-Mobile: + - "?0" + Accept: + - image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 + Sec-Fetch-Site: + - same-origin + Sec-Fetch-Mode: + - no-cors + Sec-Fetch-Dest: + - image + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + response: + status: + code: 200 + message: OK + headers: + Connection: + - close + Content-Length: + - '225' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + Last-Modified: + - Sat, 20 Nov 2004 20:16:24 GMT + Etag: + - '"e1-3e9564c23b600"' + X-Clacks-Overhead: + - GNU Terry Pratchett + Content-Type: + - image/gif + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_static_backend + Accept-Ranges: + - bytes + Date: + - Wed, 30 Jul 2025 02:22:27 GMT + Via: + - 1.1 varnish + Age: + - '3' + X-Served-By: + - cache-syd10165-SYD + X-Cache: + - HIT + X-Cache-Hits: + - '1' + X-Timer: + - S1753842148.992546,VS0,VE1 + X-Req-Url: + - recv="/icons/folder.gif",deliver="/icons/folder.gif" + body: + encoding: ASCII-8BIT + string: !binary |- + R0lGODlhFAAWAMIAAP/////Mmcz//5lmMzMzMwAAAAAAAAAAACH+TlRoaXMgYXJ0IGlzIGluIHRoZSBwdWJsaWMgZG9tYWluLiBLZXZpbiBIdWdoZXMsIGtldmluaEBlaXQuY29tLCBTZXB0ZW1iZXIgMTk5NQAh+QQBAAACACwAAAAAFAAWAAADVCi63P4wyklZufjOErrvRcR9ZKYpxUB6aokGQyzHKxyO9RoTV54PPJyPBewNSUXhcWc8soJOIjTaSVJhVphWxd3CeILUbDwmgMPmtHrNIyxM8Iw7AQA7 + recorded_at: Wed, 30 Jul 2025 02:22:28 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/fixtures/vcr_cassettes/Testing_external_scripts_loaded_in_the_browser/loads_a_website.yml b/spec/fixtures/vcr_cassettes/Testing_external_scripts_loaded_in_the_browser/loads_a_website.yml new file mode 100644 index 0000000000..bc365ae21b --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Testing_external_scripts_loaded_in_the_browser/loads_a_website.yml @@ -0,0 +1,901 @@ +--- +http_interactions: +- request: + method: get + uri: https://deb.debian.org/debian/ + body: + encoding: UTF-8 + string: '' + headers: + Connection: + - close + Upgrade-Insecure-Requests: + - '1' + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Accept: + - text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 + Sec-Ch-Ua: + - '"Not)A;Brand";v="8", "Chromium";v="138"' + Sec-Ch-Ua-Mobile: + - "?0" + Sec-Ch-Ua-Platform: + - '"Linux"' + Sec-Fetch-Site: + - none + Sec-Fetch-Mode: + - navigate + Sec-Fetch-User: + - "?1" + Sec-Fetch-Dest: + - document + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + response: + status: + code: 200 + message: OK + headers: + Connection: + - close + Content-Length: + - '5820' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + X-Clacks-Overhead: + - GNU Terry Pratchett + Content-Type: + - text/html;charset=UTF-8 + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_accumu_debian_backend_mirrors_debian_org + Via: + - 1.1 varnish, 1.1 varnish + Accept-Ranges: + - bytes + Date: + - Wed, 30 Jul 2025 02:22:24 GMT + Age: + - '0' + X-Served-By: + - cache-ams21082-AMS, cache-syd10146-SYD + X-Cache: + - HIT, HIT + X-Cache-Hits: + - 4, 1 + X-Timer: + - S1753842144.042689,VS0,VE198 + Vary: + - Accept-Encoding + X-Req-Url: + - recv="/debian/",deliver="/debian/" + body: + encoding: UTF-8 + string: | + + + + Index of /debian + + +

Index of /debian

+ + + + + + + + + + + + + + + + + + + +
[ICO]NameLast modifiedSize

[PARENTDIR]Parent Directory  -
[   ]README2025-05-17 08:29 1.2K
[   ]README.CD-manufacture2010-06-26 09:52 1.3K
[TXT]README.html2025-07-12 22:19 2.6K
[TXT]README.mirrors.html2017-03-04 20:08 291
[TXT]README.mirrors.txt2017-03-04 20:08 86
[DIR]dists/2025-07-22 17:15 -
[DIR]doc/2025-07-29 19:54 -
[   ]extrafiles2025-07-29 20:27 168K
[DIR]indices/2025-07-29 20:26 -
[   ]ls-lR.gz2025-07-29 20:23 12M
[DIR]pool/2022-10-05 17:09 -
[DIR]project/2008-11-17 23:05 -
[DIR]tools/2012-10-10 16:29 -
[DIR]zzz-dists/2025-07-12 22:20 -

+ + + + Debian Archive + + + + +

Debian Archive

+ +

See https://www.debian.org/ + for information about Debian GNU/Linux.

+ +

Current Releases

+ +

Four Debian releases are available on the main site:

+ +
+
+ +
Debian 11.11, or bullseye
+
Debian 11.11 was released Saturday, 31st August 2024. + Installation + and upgrading instructions, + More information +
+ +
Debian 12.11, or bookworm
+
Debian 12.11 was released Saturday, 17th May 2025. + Installation + and upgrading instructions, + More information +
+ +
Testing, or trixie
+
The current tested development snapshot is named trixie.
+ Packages which have been tested in unstable and passed automated + tests propagate to this release.
+ More information +
+ +
Unstable, or sid
+
The current development snapshot is named sid.
+ Untested candidate packages for future releases.
+ More information +
+
+
+ +

Old Releases

+ +

Older releases of Debian are at + http://archive.debian.org/debian-archive +
+ More information +

+ +

CDs

+ +

For more information about Debian CDs, please see + README.CD-manufacture. +
+ Further information +

+ +

Mirrors

+ +

For more information about Debian mirrors, please see + README.mirrors.html. +
+ Further information +

+ +

Other directories

+ + + + + +
doc Debian documentation.
indices Various indices of the site.
project Experimental packages and other miscellaneous files.
+ + + + + recorded_at: Wed, 30 Jul 2025 02:22:24 GMT +- request: + method: get + uri: http://deb.debian.org/debian/ + body: + encoding: UTF-8 + string: '' + headers: + Proxy-Connection: + - keep-alive + Upgrade-Insecure-Requests: + - '1' + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Accept: + - text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + Connection: + - close + response: + status: + code: 200 + message: OK + headers: + Connection: + - close + Content-Length: + - '5820' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + X-Clacks-Overhead: + - GNU Terry Pratchett + Content-Type: + - text/html;charset=UTF-8 + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_accumu_debian_backend_mirrors_debian_org + Via: + - 1.1 varnish, 1.1 varnish + Accept-Ranges: + - bytes + Age: + - '0' + Date: + - Wed, 30 Jul 2025 02:22:24 GMT + X-Served-By: + - cache-ams21082-AMS, cache-syd10179-SYD + X-Cache: + - HIT, MISS + X-Cache-Hits: + - 4, 0 + X-Timer: + - S1753842144.982706,VS0,VE258 + Vary: + - Accept-Encoding + X-Req-Url: + - recv="/debian/",deliver="/debian/" + body: + encoding: UTF-8 + string: | + + + + Index of /debian + + +

Index of /debian

+ + + + + + + + + + + + + + + + + + + +
[ICO]NameLast modifiedSize

[PARENTDIR]Parent Directory  -
[   ]README2025-05-17 08:29 1.2K
[   ]README.CD-manufacture2010-06-26 09:52 1.3K
[TXT]README.html2025-07-12 22:19 2.6K
[TXT]README.mirrors.html2017-03-04 20:08 291
[TXT]README.mirrors.txt2017-03-04 20:08 86
[DIR]dists/2025-07-22 17:15 -
[DIR]doc/2025-07-29 19:54 -
[   ]extrafiles2025-07-29 20:27 168K
[DIR]indices/2025-07-29 20:26 -
[   ]ls-lR.gz2025-07-29 20:23 12M
[DIR]pool/2022-10-05 17:09 -
[DIR]project/2008-11-17 23:05 -
[DIR]tools/2012-10-10 16:29 -
[DIR]zzz-dists/2025-07-12 22:20 -

+ + + + Debian Archive + + + + +

Debian Archive

+ +

See https://www.debian.org/ + for information about Debian GNU/Linux.

+ +

Current Releases

+ +

Four Debian releases are available on the main site:

+ +
+
+ +
Debian 11.11, or bullseye
+
Debian 11.11 was released Saturday, 31st August 2024. + Installation + and upgrading instructions, + More information +
+ +
Debian 12.11, or bookworm
+
Debian 12.11 was released Saturday, 17th May 2025. + Installation + and upgrading instructions, + More information +
+ +
Testing, or trixie
+
The current tested development snapshot is named trixie.
+ Packages which have been tested in unstable and passed automated + tests propagate to this release.
+ More information +
+ +
Unstable, or sid
+
The current development snapshot is named sid.
+ Untested candidate packages for future releases.
+ More information +
+
+
+ +

Old Releases

+ +

Older releases of Debian are at + http://archive.debian.org/debian-archive +
+ More information +

+ +

CDs

+ +

For more information about Debian CDs, please see + README.CD-manufacture. +
+ Further information +

+ +

Mirrors

+ +

For more information about Debian mirrors, please see + README.mirrors.html. +
+ Further information +

+ +

Other directories

+ + + + + +
doc Debian documentation.
indices Various indices of the site.
project Experimental packages and other miscellaneous files.
+ + + + + recorded_at: Wed, 30 Jul 2025 02:22:24 GMT +- request: + method: get + uri: http://deb.debian.org/icons/blank.gif + body: + encoding: UTF-8 + string: '' + headers: + Proxy-Connection: + - keep-alive + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Accept: + - image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + Connection: + - close + response: + status: + code: 200 + message: OK + headers: + Connection: + - close + Content-Length: + - '148' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + Last-Modified: + - Sat, 20 Nov 2004 20:16:24 GMT + Etag: + - '"94-3e9564c23b600"' + X-Clacks-Overhead: + - GNU Terry Pratchett + Content-Type: + - image/gif + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_static_backend + Accept-Ranges: + - bytes + Age: + - '0' + Date: + - Wed, 30 Jul 2025 02:22:24 GMT + Via: + - 1.1 varnish + X-Served-By: + - cache-syd10125-SYD + X-Cache: + - MISS + X-Cache-Hits: + - '0' + X-Timer: + - S1753842144.402396,VS0,VE414 + X-Req-Url: + - recv="/icons/blank.gif",deliver="/icons/blank.gif" + body: + encoding: ASCII-8BIT + string: !binary |- + R0lGODlhFAAWAKEAAP///8z//wAAAAAAACH+TlRoaXMgYXJ0IGlzIGluIHRoZSBwdWJsaWMgZG9tYWluLiBLZXZpbiBIdWdoZXMsIGtldmluaEBlaXQuY29tLCBTZXB0ZW1iZXIgMTk5NQAh+QQBAAABACwAAAAAFAAWAAACE4yPqcvtD6OctNqLs968+w+GSQEAOw== + recorded_at: Wed, 30 Jul 2025 02:22:24 GMT +- request: + method: get + uri: http://deb.debian.org/icons/back.gif + body: + encoding: UTF-8 + string: '' + headers: + Proxy-Connection: + - keep-alive + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Accept: + - image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + Connection: + - close + response: + status: + code: 200 + message: OK + headers: + Connection: + - close + Content-Length: + - '216' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + Last-Modified: + - Sat, 20 Nov 2004 20:16:24 GMT + Etag: + - '"d8-3e9564c23b600"' + X-Clacks-Overhead: + - GNU Terry Pratchett + Content-Type: + - image/gif + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_static_backend + Accept-Ranges: + - bytes + Age: + - '0' + Date: + - Wed, 30 Jul 2025 02:22:24 GMT + Via: + - 1.1 varnish + X-Served-By: + - cache-syd10140-SYD + X-Cache: + - MISS + X-Cache-Hits: + - '0' + X-Timer: + - S1753842144.402014,VS0,VE418 + X-Req-Url: + - recv="/icons/back.gif",deliver="/icons/back.gif" + body: + encoding: ASCII-8BIT + string: !binary |- + R0lGODlhFAAWAMIAAP///8z//5mZmWZmZjMzMwAAAAAAAAAAACH+TlRoaXMgYXJ0IGlzIGluIHRoZSBwdWJsaWMgZG9tYWluLiBLZXZpbiBIdWdoZXMsIGtldmluaEBlaXQuY29tLCBTZXB0ZW1iZXIgMTk5NQAh+QQBAAABACwAAAAAFAAWAAADSxi63P4jEPJqEDNTu6LO3PVpnDdOFnaCkHQGBTcqRRxuWG0v+5LrNUZQ8QPqeMakkaZsFihOpyDajMCoOoJAGNVWkt7QVfzokc+LBAA7 + recorded_at: Wed, 30 Jul 2025 02:22:24 GMT +- request: + method: get + uri: http://deb.debian.org/icons/hand.right.gif + body: + encoding: UTF-8 + string: '' + headers: + Proxy-Connection: + - keep-alive + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Accept: + - image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + Connection: + - close + response: + status: + code: 200 + message: OK + headers: + Connection: + - close + Content-Length: + - '217' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + Last-Modified: + - Sat, 20 Nov 2004 20:16:24 GMT + Etag: + - '"d9-3e9564c23b600"' + X-Clacks-Overhead: + - GNU Terry Pratchett + Content-Type: + - image/gif + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_static_backend + Accept-Ranges: + - bytes + Age: + - '0' + Date: + - Wed, 30 Jul 2025 02:22:24 GMT + Via: + - 1.1 varnish + X-Served-By: + - cache-syd10160-SYD + X-Cache: + - MISS + X-Cache-Hits: + - '0' + X-Timer: + - S1753842144.402195,VS0,VE417 + X-Req-Url: + - recv="/icons/hand.right.gif",deliver="/icons/hand.right.gif" + body: + encoding: ASCII-8BIT + string: !binary |- + R0lGODlhFAAWAMIAAP/////Mmcz//5lmMwAAAAAAAAAAAAAAACH+TlRoaXMgYXJ0IGlzIGluIHRoZSBwdWJsaWMgZG9tYWluLiBLZXZpbiBIdWdoZXMsIGtldmluaEBlaXQuY29tLCBTZXB0ZW1iZXIgMTk5NQAh+QQBAAACACwAAAAAFAAWAAADTCi63P4wykkdubiSwDuRVydi5CWEYjBsKbe2rDjMdMwRw1iaaZx7jcDm8nOpVsFjsSh0CFuq46fxko0eKOtsiu0UuRHfVlOqmM9oSgIAOw== + recorded_at: Wed, 30 Jul 2025 02:22:24 GMT +- request: + method: get + uri: http://deb.debian.org/icons/text.gif + body: + encoding: UTF-8 + string: '' + headers: + Proxy-Connection: + - keep-alive + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Accept: + - image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + Connection: + - close + response: + status: + code: 200 + message: OK + headers: + Connection: + - close + Content-Length: + - '229' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + Last-Modified: + - Sat, 20 Nov 2004 20:16:24 GMT + Etag: + - '"e5-3e9564c23b600"' + X-Clacks-Overhead: + - GNU Terry Pratchett + Content-Type: + - image/gif + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_static_backend + Accept-Ranges: + - bytes + Age: + - '0' + Date: + - Wed, 30 Jul 2025 02:22:25 GMT + Via: + - 1.1 varnish + X-Served-By: + - cache-syd10179-SYD + X-Cache: + - MISS + X-Cache-Hits: + - '0' + X-Timer: + - S1753842144.431907,VS0,VE589 + X-Req-Url: + - recv="/icons/text.gif",deliver="/icons/text.gif" + body: + encoding: ASCII-8BIT + string: !binary |- + R0lGODlhFAAWAMIAAP///8z//5mZmTMzMwAAAAAAAAAAAAAAACH+TlRoaXMgYXJ0IGlzIGluIHRoZSBwdWJsaWMgZG9tYWluLiBLZXZpbiBIdWdoZXMsIGtldmluaEBlaXQuY29tLCBTZXB0ZW1iZXIgMTk5NQAh+QQBAAABACwAAAAAFAAWAAADWDi6vPEwDECrnSO+aTvPEddVIriN1wVxROtSxBDPJwq7bo23luALhJqt8gtKbrsXBSgcEo2spBLAPDp7UKT02bxWRdrp94rtbpdZMrrr/A5+8LhPFpHajQkAOw== + recorded_at: Wed, 30 Jul 2025 02:22:25 GMT +- request: + method: get + uri: http://deb.debian.org/icons/folder.gif + body: + encoding: UTF-8 + string: '' + headers: + Proxy-Connection: + - keep-alive + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Accept: + - image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + Connection: + - close + response: + status: + code: 200 + message: OK + headers: + Connection: + - close + Content-Length: + - '225' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + Last-Modified: + - Sat, 20 Nov 2004 20:16:24 GMT + Etag: + - '"e1-3e9564c23b600"' + X-Clacks-Overhead: + - GNU Terry Pratchett + Content-Type: + - image/gif + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_static_backend + Accept-Ranges: + - bytes + Age: + - '0' + Date: + - Wed, 30 Jul 2025 02:22:25 GMT + Via: + - 1.1 varnish + X-Served-By: + - cache-syd10182-SYD + X-Cache: + - MISS + X-Cache-Hits: + - '0' + X-Timer: + - S1753842144.432033,VS0,VE589 + X-Req-Url: + - recv="/icons/folder.gif",deliver="/icons/folder.gif" + body: + encoding: ASCII-8BIT + string: !binary |- + R0lGODlhFAAWAMIAAP/////Mmcz//5lmMzMzMwAAAAAAAAAAACH+TlRoaXMgYXJ0IGlzIGluIHRoZSBwdWJsaWMgZG9tYWluLiBLZXZpbiBIdWdoZXMsIGtldmluaEBlaXQuY29tLCBTZXB0ZW1iZXIgMTk5NQAh+QQBAAACACwAAAAAFAAWAAADVCi63P4wyklZufjOErrvRcR9ZKYpxUB6aokGQyzHKxyO9RoTV54PPJyPBewNSUXhcWc8soJOIjTaSVJhVphWxd3CeILUbDwmgMPmtHrNIyxM8Iw7AQA7 + recorded_at: Wed, 30 Jul 2025 02:22:25 GMT +- request: + method: get + uri: http://deb.debian.org/icons/unknown.gif + body: + encoding: UTF-8 + string: '' + headers: + Proxy-Connection: + - keep-alive + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Accept: + - image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + Connection: + - close + response: + status: + code: 200 + message: OK + headers: + Connection: + - close + Content-Length: + - '245' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + Last-Modified: + - Sat, 20 Nov 2004 20:16:24 GMT + Etag: + - '"f5-3e9564c23b600"' + X-Clacks-Overhead: + - GNU Terry Pratchett + Content-Type: + - image/gif + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_static_backend + Accept-Ranges: + - bytes + Age: + - '0' + Date: + - Wed, 30 Jul 2025 02:22:25 GMT + Via: + - 1.1 varnish + X-Served-By: + - cache-syd10136-SYD + X-Cache: + - MISS + X-Cache-Hits: + - '0' + X-Timer: + - S1753842144.402202,VS0,VE623 + X-Req-Url: + - recv="/icons/unknown.gif",deliver="/icons/unknown.gif" + body: + encoding: ASCII-8BIT + string: !binary |- + R0lGODlhFAAWAMIAAP///8z//5mZmTMzMwAAAAAAAAAAAAAAACH+TlRoaXMgYXJ0IGlzIGluIHRoZSBwdWJsaWMgZG9tYWluLiBLZXZpbiBIdWdoZXMsIGtldmluaEBlaXQuY29tLCBTZXB0ZW1iZXIgMTk5NQAh+QQBAAABACwAAAAAFAAWAAADaDi6vPEwDECrnSO+aTvPEQcIAmGaIrhR5XmKgMq1LkoMN7ECrjDWp52r0iPpJJ0KjUAq7SxLE+sI+9V8vycFiM0iLb2O80s8JcfVJJTaGYrZYPNby5Ov6WolPD+XDJqAgSQ4EUCGQQEJADs= + recorded_at: Wed, 30 Jul 2025 02:22:25 GMT +- request: + method: get + uri: http://deb.debian.org/icons/compressed.gif + body: + encoding: UTF-8 + string: '' + headers: + Proxy-Connection: + - keep-alive + User-Agent: + - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/138.0.0.0 + Safari/537.36 + Accept: + - image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8 + Accept-Encoding: + - '' + Accept-Language: + - en-US,en;q=0.9 + Connection: + - close + response: + status: + code: 200 + message: OK + headers: + Connection: + - close + Content-Length: + - '1038' + Server: + - Apache + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - sameorigin + Referrer-Policy: + - no-referrer + X-Xss-Protection: + - '1' + Permissions-Policy: + - interest-cohort=() + Last-Modified: + - Sat, 20 Nov 2004 20:16:24 GMT + Etag: + - '"40e-3e9564c23b600"' + X-Clacks-Overhead: + - GNU Terry Pratchett + Content-Type: + - image/gif + Backend: + - 4qpvL1tJyeV1P6Tmf0Lj8g--F_static_backend + Accept-Ranges: + - bytes + Age: + - '0' + Date: + - Wed, 30 Jul 2025 02:22:25 GMT + Via: + - 1.1 varnish + X-Served-By: + - cache-syd10169-SYD + X-Cache: + - MISS + X-Cache-Hits: + - '0' + X-Timer: + - S1753842145.932677,VS0,VE585 + X-Req-Url: + - recv="/icons/compressed.gif",deliver="/icons/compressed.gif" + body: + encoding: ASCII-8BIT + string: !binary |- + R0lGODlhFAAWAOcAAP//////zP//mf//Zv//M///AP/M///MzP/Mmf/MZv/MM//MAP+Z//+ZzP+Zmf+ZZv+ZM/+ZAP9m//9mzP9mmf9mZv9mM/9mAP8z//8zzP8zmf8zZv8zM/8zAP8A//8AzP8Amf8AZv8AM/8AAMz//8z/zMz/mcz/Zsz/M8z/AMzM/8zMzMzMmczMZszMM8zMAMyZ/8yZzMyZmcyZZsyZM8yZAMxm/8xmzMxmmcxmZsxmM8xmAMwz/8wzzMwzmcwzZswzM8wzAMwA/8wAzMwAmcwAZswAM8wAAJn//5n/zJn/mZn/Zpn/M5n/AJnM/5nMzJnMmZnMZpnMM5nMAJmZ/5mZzJmZmZmZZpmZM5mZAJlm/5lmzJlmmZlmZplmM5lmAJkz/5kzzJkzmZkzZpkzM5kzAJkA/5kAzJkAmZkAZpkAM5kAAGb//2b/zGb/mWb/Zmb/M2b/AGbM/2bMzGbMmWbMZmbMM2bMAGaZ/2aZzGaZmWaZZmaZM2aZAGZm/2ZmzGZmmWZmZmZmM2ZmAGYz/2YzzGYzmWYzZmYzM2YzAGYA/2YAzGYAmWYAZmYAM2YAADP//zP/zDP/mTP/ZjP/MzP/ADPM/zPMzDPMmTPMZjPMMzPMADOZ/zOZzDOZmTOZZjOZMzOZADNm/zNmzDNmmTNmZjNmMzNmADMz/zMzzDMzmTMzZjMzMzMzADMA/zMAzDMAmTMAZjMAMzMAAAD//wD/zAD/mQD/ZgD/MwD/AADM/wDMzADMmQDMZgDMMwDMAACZ/wCZzACZmQCZZgCZMwCZAABm/wBmzABmmQBmZgBmMwBmAAAz/wAzzAAzmQAzZgAzMwAzAAAA/wAAzAAAmQAAZgAAM+4AAN0AALsAAKoAAIgAAHcAAFUAAEQAACIAABEAAADuAADdAAC7AACqAACIAAB3AABVAABEAAAiAAARAAAA7gAA3QAAuwAAqgAAiAAAdwAAVQAARAAAIgAAEe7u7t3d3bu7u6qqqoiIiHd3d1VVVURERCIiIhEREQAAACH+TlRoaXMgYXJ0IGlzIGluIHRoZSBwdWJsaWMgZG9tYWluLiBLZXZpbiBIdWdoZXMsIGtldmluaEBlaXQuY29tLCBTZXB0ZW1iZXIgMTk5NQAh+QQBAAAkACwAAAAAFAAWAAAImQBJCCTBqmDBgQgTDmQFAABDVgojEmzI0KHEhBUrWrwoMGNDihwnAvjHiqRJjhX/qVz5D+VHAFZiWmmZ8BGHji9hxqTJ4ZFAmzc1vpxJgkPPn0Y5CP04M6lPEkCN5mxoJelRqFY5TM36NGrPqV67Op0KM6rYnkup/gMq1mdamC1tdn36lijUpwjr0pSoFyUrmTJLhiTBkqXCgAA7 + recorded_at: Wed, 30 Jul 2025 02:22:25 GMT +recorded_with: VCR 6.2.0 diff --git a/spec/support/vcr_setup.rb b/spec/support/vcr_setup.rb index ad44f367fa..df67e7d69d 100644 --- a/spec/support/vcr_setup.rb +++ b/spec/support/vcr_setup.rb @@ -5,9 +5,17 @@ require 'vcr' VCR.configure do |config| config.cassette_library_dir = "spec/fixtures/vcr_cassettes" config.hook_into :webmock - config.ignore_localhost = true config.configure_rspec_metadata! - config.ignore_localhost = true + + # Chrome calls a lot of services and they trip us up. + config.ignore_hosts( + "localhost", "127.0.0.1", "0.0.0.0", + "accounts.google.com", + "android.clients.google.com", + "clients2.google.com", + "content-autofill.googleapis.com", + "optimizationguide-pa.googleapis.com", + ) # Filter sensitive environment variables %w[ diff --git a/spec/system/billy_spec.rb b/spec/system/billy_spec.rb new file mode 100644 index 0000000000..251e827af8 --- /dev/null +++ b/spec/system/billy_spec.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +require 'system_helper' + +RSpec.describe "Testing external scripts loaded in the browser" do + it "loads a website", :vcr do + visit "http://deb.debian.org:80/debian/" + expect(page).to have_content "Debian Archive" + end + + it "handles HTTPS", :vcr do + visit "https://deb.debian.org:443/debian/" + expect(page).to have_content "Debian Archive" + end + + it "stubs content" do + stub_request(:get, "https://deb.debian.org:443").to_return(body: "stubbed") + visit "https://deb.debian.org:443" + expect(page).to have_content "stubbed" + end +end diff --git a/spec/system/support/cuprite_setup.rb b/spec/system/support/cuprite_setup.rb index 431d4d546d..6d44e72ba3 100644 --- a/spec/system/support/cuprite_setup.rb +++ b/spec/system/support/cuprite_setup.rb @@ -4,7 +4,9 @@ require "capybara/cuprite" headless = ActiveModel::Type::Boolean.new.cast(ENV.fetch("HEADLESS", true)) -browser_options = {} +browser_options = { + "ignore-certificate-errors" => nil, +} browser_options["no-sandbox"] = nil if ENV['CI'] || ENV['DOCKER'] Capybara.register_driver(:cuprite_ofn) do |app| @@ -15,10 +17,16 @@ Capybara.register_driver(:cuprite_ofn) do |app| process_timeout: 60, timeout: 60, # Don't load scripts from external sources, like google maps or stripe - url_whitelist: [%r{http://localhost}i, %r{http://0.0.0.0}i, %r{http://127.0.0.1}], + url_whitelist: [ + %r{^http://localhost}, %r{^http://0.0.0.0}, %r{http://127.0.0.1}, + + # Just for testing external connections: spec/system/billy_spec.rb + %r{^https?://deb.debian.org}, + ], inspector: true, headless:, - js_errors: true + js_errors: true, + proxy: { host: Billy.proxy.host, port: Billy.proxy.port }, ) end