From 2ffb570850165ef13616cf2eec42046d928e8e18 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Mon, 23 Nov 2020 18:46:12 +0000 Subject: [PATCH] Console: Serve default favicon.ico i2ptunnel: Remove dup link to nonexistent theme favicon.ico --- apps/i2ptunnel/jsp/edit.jsp | 1 - apps/i2ptunnel/jsp/index.jsp | 1 - apps/i2ptunnel/jsp/register.jsp | 1 - apps/i2ptunnel/jsp/ssl.jsp | 1 - apps/i2ptunnel/jsp/wizard.jsp | 1 - apps/routerconsole/java/build.xml | 2 ++ .../java/src/net/i2p/router/web/LocaleWebAppHandler.java | 2 ++ 7 files changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/i2ptunnel/jsp/edit.jsp b/apps/i2ptunnel/jsp/edit.jsp index 02c2781949..322bf88569 100644 --- a/apps/i2ptunnel/jsp/edit.jsp +++ b/apps/i2ptunnel/jsp/edit.jsp @@ -39,7 +39,6 @@ if (tun != null) { <title><%=intl._t("Hidden Services Manager")%> - <%=(__isClient ? intl._t("Edit Client Tunnel") : intl._t("Edit Hidden Service"))%></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" /> - <link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" /> <link href="<%=editBean.getTheme()%>i2ptunnel.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" /> <style type='text/css'> input.default { width: 1px; height: 1px; visibility: hidden; } diff --git a/apps/i2ptunnel/jsp/index.jsp b/apps/i2ptunnel/jsp/index.jsp index efba93cd17..c502628f4f 100644 --- a/apps/i2ptunnel/jsp/index.jsp +++ b/apps/i2ptunnel/jsp/index.jsp @@ -13,7 +13,6 @@ <title><%=intl._t("Hidden Services Manager")%></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" /> - <link rel="icon" href="<%=indexBean.getTheme()%>images/favicon.ico" /> <link href="<%=indexBean.getTheme()%>i2ptunnel.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" /> </head><body id="tunnelListPage"> <div class="panel" id="overview"><h2><%=intl._t("Hidden Services Manager")%></h2><p> diff --git a/apps/i2ptunnel/jsp/register.jsp b/apps/i2ptunnel/jsp/register.jsp index 60e1f30587..73112987cc 100644 --- a/apps/i2ptunnel/jsp/register.jsp +++ b/apps/i2ptunnel/jsp/register.jsp @@ -27,7 +27,6 @@ <title><%=intl._t("Hidden Services Manager")%> - <%=intl._t("Registration Helper")%></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" /> - <link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" /> <link href="<%=editBean.getTheme()%>i2ptunnel.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" /> <style type='text/css'> input.default { width: 1px; height: 1px; visibility: hidden; } diff --git a/apps/i2ptunnel/jsp/ssl.jsp b/apps/i2ptunnel/jsp/ssl.jsp index 8b1e1fc60e..7ac29d68ac 100644 --- a/apps/i2ptunnel/jsp/ssl.jsp +++ b/apps/i2ptunnel/jsp/ssl.jsp @@ -26,7 +26,6 @@ <title><%=intl._t("Hidden Services Manager")%> - <%=intl._t("SSL Helper")%></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" /> - <link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" /> <link href="<%=editBean.getTheme()%>i2ptunnel.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" /> <style type='text/css'> input.default { width: 1px; height: 1px; visibility: hidden; } diff --git a/apps/i2ptunnel/jsp/wizard.jsp b/apps/i2ptunnel/jsp/wizard.jsp index 96d2c8504d..1e9038e601 100644 --- a/apps/i2ptunnel/jsp/wizard.jsp +++ b/apps/i2ptunnel/jsp/wizard.jsp @@ -46,7 +46,6 @@ <title><%=intl._t("I2P Tunnel Manager - Tunnel Creation Wizard")%></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" /> - <link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" /> <link href="<%=editBean.getTheme()%>i2ptunnel.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" /> </head> <body id="tunnelWizardPage"> diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml index fa79c23787..b2eeb1f9ac 100644 --- a/apps/routerconsole/java/build.xml +++ b/apps/routerconsole/java/build.xml @@ -339,6 +339,7 @@ <!-- set if unset --> <property name="workspace.changes.w.tr" value="" /> <!-- Don't include the css in the war, the main build.xml will copy it to docs/themes/console/ --> + <copy file="../../../installer/resources/themes/console/images/favicon.ico" tofile="../jsp/favicon.ico" /> <war destfile="build/routerconsole.war" webxml="../jsp/web-out.xml" basedir="../jsp/" excludes="web.xml, *.css, **/*.java, *.jsp, *.jsi, web-fragment.xml, web-out.xml"> <manifest> @@ -678,6 +679,7 @@ <delete dir="../jsp/WEB-INF/" /> <delete file="../jsp/web-fragment.xml" /> <delete file="../jsp/web-out.xml" /> + <delete file="../jsp/favicon.ico" /> </target> <target name="cleandep" depends="clean"> </target> diff --git a/apps/routerconsole/java/src/net/i2p/router/web/LocaleWebAppHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/LocaleWebAppHandler.java index 3ddb8dc7cc..9e3c7f5490 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/LocaleWebAppHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/LocaleWebAppHandler.java @@ -61,6 +61,8 @@ public class LocaleWebAppHandler extends HandlerWrapper if (pathInContext.equals("/") || pathInContext.equals("/index.html")) { // home page pathInContext = "/index.jsp"; + } else if (pathInContext.equals("/favicon.ico")) { + // pass thru unchanged } else if (pathInContext.indexOf('/', 1) < 0 && (!pathInContext.endsWith(".jsp")) && (!pathInContext.endsWith(".log")) && -- GitLab