Re: [whatwg/url] Support IPv6 zone identifiers (#392)

Hi guys, sorry to bother you but I stumbled upon this issue while trying to figure out some weird issue.
I'm running a Linux system and I'd like to configure a new device I got.

The manual states I can access the device via browser with an address that can be generated from the MAC: `http://[fe80::fe5c:44ff:febf:6974]` in the URL bar.

That doesn't work at all in firefox showing `NS_ERROR_FAILURE`:

![configure-firefox-1](https://github.com/user-attachments/assets/dd9b37bc-e01b-4a0a-b557-6c7c0b9a33ff)

Also this does not work with curl:

```
$ curl -v http://[fe80::fe5f:49ff:febf:6974]
*   Trying [fe80::fe5f:49ff:febf:6974]:80...
* Immediate connect fail for fe80::fe5f:49ff:febf:6974: Invalid argument
* Failed to connect to fe80::fe5f:49ff:febf:6974 port 80 after 0 ms: Could not connect to server
* closing connection #0
curl: (7) Failed to connect to fe80::fe5f:49ff:febf:6974 port 80 after 0 ms: Could not connect to server
```

So I did some research and it turned out that this is a link-local address. Accessing link-local addresses with Linux require a zone identifier.

So with curl I can now successfully connect to the device:

```
$ curl -v http://[fe80::fe5c:44ff:febf:6974%eno0]
*   Trying [fe80::fe5c:44ff:febf:6974]:80...
* Connected to fe80::fe5c:44ff:febf:6974 (fe80::fe5c:44ff:febf:6974) port 80
* using HTTP/1.x
> GET / HTTP/1.1
> Host: [fe80::fe5c:44ff:febf:6974]
> User-Agent: curl/8.11.0
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 200 OK
< CACHE-CONTROL: no-cache
< Content-Length: 40469
< Content-Type: text/html
<
<!DOCTYPE html> <html> <head> <title></title> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible"
```

But this doesn't work with Firefox or Chrome.

When entering the address that works with curl, Firefox starts a search instead:

![search-instead-interface](https://github.com/user-attachments/assets/b4298791-7488-4f70-b51f-e2e3d8f3cec0)

I was told this does work on Windows however. But I'd rather not install this just to configure some device.

Can anyone please explain like I am 5 why this works in curl but not in Firefox? I just want to configure my device.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/392#issuecomment-2521119117
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/issues/392/2521119117@github.com>

Received on Thursday, 5 December 2024 18:26:28 UTC