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

Show:
codehaus
April 10, 2015, 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>

Assignee

Unassigned

Reporter

codehaus

Triage

None

Fix versions

Affects versions

Components

Priority

High
Configure