Opened 19 years ago

Closed 19 years ago

#1075 closed enhancement (fixed)

[OWS] is port 80 really needed on URLs?

Reported by: tomkralidis Owned by: mapserverbugs
Priority: high Milestone: 4.6 release
Component: WMS Server Version: unspecified
Severity: minor Keywords:
Cc:

Description

Hi,

In mapows.c, function msOWSGetOnlineResource, if ows_onlineresource is not set,
one is set automagically.  Part of this includes tacking on the HTTP environment
variable SERVER_PORT to the URL.

While I see the rationale for this, do we need to tack on the port number if
it's port 80?  Perhaps if SERVER_PORT == 80, then don't tack on at all?

Change History (5)

comment:1 by dmorissette, 19 years ago

Wow! The software must be in real good shape if you're down reporting this kind
of aesthetic details as bugs.  ;)  

More seriously: is this really causing a problem anywhere?

comment:2 by tomkralidis, 19 years ago

Severity: normalenhancement
I knew this one would get this type of response :)

It's not causing any problems.  Perhaps better filed as an enhancement, just
from the point of view of why put extra info when it's not necessarily needed.

comment:3 by dmorissette, 19 years ago

Milestone: 4.6 release
Let's do it in 4.6... it's easy, but why take risks just before a release.

comment:4 by tomkralidis, 19 years ago

Putting this change at line 418 of mapows.c does the trick:

if (online_resource)
{
  if (strcmp(port,"80") == 0) {
    sprintf(online_resource, "%s://%s%s?", protocol, hostname, script);
}
  else {
    sprintf(online_resource, "%s://%s:%s%s?", protocol, hostname, port, script);
  }

.....

comment:5 by dmorissette, 19 years ago

Resolution: fixed
Status: newclosed
I have committed a fix for this in v4.5 (CVS)... my fix verifies that protocol
is http and port is 80, and does the same for https/443.
Note: See TracTickets for help on using tickets.