Firefox is entirely misfeatured when it comes to ports.

On my desktop, it will no longer let me connect to http://nas.local:XXX because i have previously used https://nas.local:YYY for something else. It refuses to permit http and https to coexist on different ports on the same hostname.

On my phone, ports are banned. Not all ports, just some. The list is arbitrary and secret, and cannot be modified on release builds.

@directhex

On Firefox mobile I have a bookmark to "http://server.lan". It doesn't even use a non-standard port. Firefox randomly tries to open it with https about once a month for absolutely no reason, and I have to manually change the URL bar to http. Once I have done that the bookmark goes back to working. It is totally bizarre.

@directhex browsers unilaterally blocking port 10080 a while back gave us a ton of grief because zend server's default port was.... 10080
@directhex did the service you were running on HTTPS specify HSTS? I could easily see that being the issue there, and if so it's working as it should
HTTP Strict Transport Security - Wikipedia