skodvavi: The problem you describe has been reported to the Mozilla folks. (They develop the basic browser which AOL marketing occasionally modifies to make what they call "Netscape.") See for example
bug 189784: cookies do not recognize port number and
bug 227475: add port the cookie was received from. Fixing these bugs would require breaking
bug 142803: Port is being stored as part of cookie domain.
Historically Mozilla/Netscape has flipflopped on whether cookies should be distinguished by port. Currently the browser does not, because of bug 142803. Sadly, the published cookie behaviour spec is open to some interpretation and even some points that are fairly clear are not followed precisely because websites exist which assume slightly off-spec behaviour implemented by slightly off-spec browsers. In my experience none of the browsers behave precisely the same at the fuzzy limits of the spec. The current feeling is that cookies should not be distinguished by port. This is nicely summarized in
bug 142803 comment 28.
I believe that Mozilla discards all port information when storing cookies. Now, ha,
my interpretation of the spec (
RFC 2965) is that this is only mostly correct. And they say language was a useful invention. You can of course add comments to these bugs, hoping for a change. But please do so only if you know whereof you speak, and keep in mind that at least two bugs requesting a return of the older port-specific behaviour have been rejected.
Possible workaround: if these servers are located on a private LAN you could consider adding another DNS entry for the same host, to be used when accessing the other port number...
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040811 Firefox/0.9.1+