RESOLVED FIXED304164
REGRESSION (298981@main): fetch() throws TypeError when using targetAddressSpace: 'loopback' with localhost requests
https://bugs.webkit.org/show_bug.cgi?id=304164
Summary REGRESSION (298981@main): fetch() throws TypeError when using targetAddressSp...
1433452387
Reported 2025-12-15 00:32:28 PST
Description When making a simple fetch() request to a locally deployed HTTP service (e.g. 127.0.0.1), Safari 26.2 throws a TypeError and immediately enters the catch block if the targetAddressSpace: 'loopback' option is provided. This behavior does not occur in: Safari 26.1 Chrome (where targetAddressSpace: 'loopback' is required for compatibility) If any other arbitrary option is passed instead (e.g. { a: "abc" }), the request succeeds normally in Safari 26.2. Steps to Reproduce Start a simple local HTTP server: Example: http://127.0.0.1:8080 Endpoint returns plain text via GET Run the following code in Safari 26.2: fetch('http://127.0.0.1:8080', { targetAddressSpace: 'loopback' }) .then(response => response.text()) .then(text => console.log(text)) .catch(error => console.error(error)); Expected Result The request succeeds Response text is logged to the console Actual Result The request immediately fails catch is triggered with a TypeError No network request is completed
Attachments
Radar WebKit Bug Importer
Comment 1 2025-12-15 16:12:08 PST
Ryosuke Niwa
Comment 2 2025-12-16 13:31:24 PST
This is because we don’t support “loopback” for IPAddressSpace: https://wicg.github.io/local-network-access/#ip-address-space-section
Ryosuke Niwa
Comment 3 2025-12-16 15:15:04 PST
EWS
Comment 4 2025-12-16 23:02:16 PST
Committed 304577@main (295fd224c10d): <https://commits.webkit.org/304577@main> Reviewed commits have been landed. Closing PR #55516 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.