Hmmm... GeoServer tends to fill out the capabilities document with how
the request was made, so I think geoserver somehow thinks it's getting
the request from localhost:80. There's been a request to make it so one
can customize that: http://jira.codehaus.org/browse/GEOS-598 You can
vote on the issue to bump it up our queue a bit.
You also can hack it, see:
But it's a bit weird that it's returning the :80 when your request is to
8888. Is it possible that perl is ignoring the port? If you turn off
port forwarding/apache, so geoserver doesn't respond at :80 then I guess
that this script won't work, as GeoServer is generally good at returning
the url where it gets the request. So yeah, figure out if there's
another way to set the port requested in perl.
Ellery Chan wrote:
> I am getting an incorrect host address in my GetCapabilities response.
> I have Geoserver 1.3.1 running in the Jetty container at
> http://localhost:8888. When I submit a GetCapabilities request directly
> from a web browser I get a correct response, where the onlineResource values
> all look like this:
> <Get onlineResource="http://localhost:8888/geoserver/wfs?"/>
> However, when I make the same request from a Perl script containing:
> #!/usr/bin/perl -wT
> use XML::LibXML;
> my $parser = XML::LibXML->new();
> my $getcaps_url =
> my $getcaps_doc = $parser->parse_file($getcaps_url);
> the onlineResource values have the wrong host address:
> <Get onlineResource="http://localhost:80/geoserver/wfs?"/>
> If I save the correct response from my web browser to a file, then read the
> file with my Perl script, the address are still correct, so I believe that
> Geoserver is returning the wrong addresses, and they are not being corrupted
> by the Perl XML parser.
> Why is this host address conversion happening, and can I prevent it?
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> Geoserver-users mailing list
The Open Planning Project