Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'd like to avoid remembering common port names: e.g. for my CUPS it's http://localhost:631/.

I know that there're service names (named aliases for ports) in '/etc/services':

$ cat /etc/services | grep ipp
ipp             631/tcp     # Internet Printing Protocol
ipp             631/udp

And this works just fine:

$ lynx http://localhost:ipp/

However, accessng http://localhost:ipp/ does not work in Firefox, Opera, Konqueror.

Any ideas?

share|improve this question
    
Use the port number... –  EmmEff Sep 22 '09 at 14:05
    
You seem to know nothing about laziness ;) Anyway, if there's such a feature - it should work! :) –  kolypto Sep 22 '09 at 14:14
    
The GUI tends to be segregated from the CLI apps (and configurations). For example, you might setup a SOCKS tunnel in the GUI, but no command line apps know about it. –  Nerdling Sep 22 '09 at 14:47
1  
No, that's not the case. Browsers should just use getportbyname() for [a-z]* ports –  kolypto Sep 22 '09 at 15:23

2 Answers 2

up vote 4 down vote accepted

Be glad that the browser authors are sticking to the RFC (1738). Chaos ensues when software makers don't follow RFCs, as those documents set the pace for standards on the Internet.

Using the port number instead of a service name is cross platform, as not all systems have consistent contents for /etc/services, or an equivalent.

Specifically in this case, section 3.1 of the RFC states:

3.1. Common Internet Scheme Syntax

While the syntax for the rest of the URL may vary depending on the
particular scheme selected, URL schemes that involve the direct use
of an IP-based protocol to a specified host on the Internet use a common syntax for the scheme-specific data:

    //<user>:<password>@<host>:<port>/<url-path>

...

port
    The port number to connect to. Most schemes designate
    protocols that have a default port number. Another port number
    may optionally be supplied, in decimal, separated from the
    host by a colon. If the port is omitted, the colon is as well.
share|improve this answer
1  
You're absolutely right. The only thing that confused me that lynx was able to handle the URL correctly. Thanks anyway :) –  kolypto Sep 22 '09 at 18:45

File a bug. Wait, someone did and it was rejected because it contradicts RFC 1738. So I guess you'll have to convince Mozilla (or Opera or KDE) to change their mind.

share|improve this answer
1  
Or write an updated RFC and convince the 'net to accept it and THEN convince the browser teams to update their software. :-) –  Doug Harris Sep 22 '09 at 17:46
    
Or, if you use Firefox (or, well, anything other than Opera) write your own extension. –  grawity Sep 23 '09 at 16:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.