https://defect.opensolaris.org/bz/show_bug.cgi?id=18754

--- Comment #6 from Jens Elkner <[email protected]> 2011-12-13 
23:07:41 UTC ---
(In reply to comment #1)
> changeset:   1278:e5415cfaa3db
> 
> needs verification though ...

--- opensearch.jsp.orig Tue Dec 13 23:36:05 2011
+++ opensearch.jsp      Wed Dec 14 00:06:27 2011
@@ -41,12 +41,13 @@
        cfg = PageConfig.get(request);

        StringBuilder url = new StringBuilder(128);
-        String protocol="http://";;
-        if (request.getProtocol().toUpperCase().startsWith("HTTPS"))
protocol="https://";;
-       url.append(protocol).append(request.getServerName());
+        String scheme = request.getScheme();
        int port = request.getServerPort();
-       if (port != 80) {
-               url.append(':').append(request.getServerPort());
+       url.append(scheme).append("://").append(request.ServerName());
+       if ((scheme.equals("http") && port != 80) ||
+               (scheme.equals("https") && port != 443))
+       {
+               url.append(':').append(port);
        }
        port = url.length();    // mark
        String img =
url.append(cfg.getCssDir()).append("/img/icon.png").toString();

should be correct.

-- 
Configure bugmail: https://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
opengrok-dev mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opengrok-dev

Reply via email to