[Geoserver-devel] [jira] Created: (GEOS-444) URL encoding

URL encoding
------------

         Key: GEOS-444
         URL: http://jira.codehaus.org/browse/GEOS-444
     Project: GeoServer
        Type: Bug
    Reporter: Brent Owens
Assigned to: Brent Owens
     Fix For: 1.3.0 RC6

"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://."

The offending methods are:
WFS:
getCapabilities link
TestWfsPost link

WMS:
getCapabilities link

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() +"/";
    }

"HttpServletRequest extends HttpServlet which provides the getScheme() public method (e.g., http, https, ftp, etc.); I don't think there is guessing involved. However, I could be wrong. I think substituting the hardcoded "http://" with getScheme() + "://" is more appropriate.

v/r,
Efren"

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira