URL Encoding issue

Description

At the moment I am hosting Geoserver at an "https://" URL; however, after deployment, all of the WMS/WFS links are "http://" instead of "https://". Here is the offending method in org.vfny.geoserver.util.Requests class:

public static String getBaseUrl(HttpServletRequest httpServletRequest) {
/*

  • didier (2004/10/03) assumption removed :
    * return "http://" + httpServletRequest.getServerName() + ":"
    * + httpServletRequest.getServerPort() + "/geoserver/";
    */
    return "http://" + httpServletRequest.getServerName() + ":" + httpServletRequest.getServerPort() + httpServletRequest.getContextPath() +"/";
    }

It should be changed to:

public static String getBaseUrl(HttpServletRequest httpServletRequest) {
return httpServletRequest.getScheme() + "://"
+ httpServletRequest.getServerName() + ":"
+ httpServletRequest.getServerPort() + httpServletRequest.getContextPath() +"/";
}

Environment

None

Activity

codehaus 
April 10, 2015 at 3:54 PM

CodeHaus Comment From: cholmes - Time: Wed, 27 Sep 2006 15:30:05 -0500
---------------------
<p>Pretty positive this got fixed, not sure when, but it should be in the current versions.</p>

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Components

Priority

Created November 3, 2005 at 4:00 PM
Updated October 31, 2015 at 4:53 PM
Resolved May 26, 2015 at 2:09 PM