forked from I2P_Developers/i2p.i2p
merge of '1ba9885122d9a9ec69c77342719d8464aae244be'
and 'c61353ade089ac0e1fa83fab661dc6893b51b95a'
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -817,7 +817,7 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer {
|
||||
* @throws BadRequestException on bad headers
|
||||
* @throws IOException on other errors in the underlying stream
|
||||
*/
|
||||
private static Map<String, List<String>> readHeaders(I2PSocket socket, InputStream in, StringBuilder command,
|
||||
static Map<String, List<String>> readHeaders(I2PSocket socket, InputStream in, StringBuilder command,
|
||||
String[] skipHeaders, I2PAppContext ctx) throws IOException {
|
||||
HashMap<String, List<String>> headers = new HashMap<String, List<String>>();
|
||||
StringBuilder buf = new StringBuilder(128);
|
||||
|
@@ -28,7 +28,7 @@ public class I2PTunnelHTTPServerTest extends TestCase {
|
||||
headerString += "BLAH: something\r\n";
|
||||
headerString += "\r\n";
|
||||
InputStream in = fillInputStream(headerString);
|
||||
Map<String, List<String>> headers = I2PTunnelHTTPServer.readHeaders(in, new StringBuilder(128), new String[0], I2PAppContext.getGlobalContext());
|
||||
Map<String, List<String>> headers = I2PTunnelHTTPServer.readHeaders(null, in, new StringBuilder(128), new String[0], I2PAppContext.getGlobalContext());
|
||||
assertEquals(headers.size(), 1); //One header
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class I2PTunnelHTTPServerTest extends TestCase {
|
||||
headerString += "someHeader: oh my, duplication!\r\n";
|
||||
headerString += "\r\n";
|
||||
InputStream in = fillInputStream(headerString);
|
||||
Map<String, List<String>> headers = I2PTunnelHTTPServer.readHeaders(in, new StringBuilder(128), new String[0], I2PAppContext.getGlobalContext());
|
||||
Map<String, List<String>> headers = I2PTunnelHTTPServer.readHeaders(null, in, new StringBuilder(128), new String[0], I2PAppContext.getGlobalContext());
|
||||
assertEquals(headers.size(), 1);
|
||||
assertEquals(headers.get("someHeader").size(), 2);
|
||||
}
|
||||
@@ -51,7 +51,7 @@ public class I2PTunnelHTTPServerTest extends TestCase {
|
||||
headerString += "\r\n";
|
||||
InputStream in = fillInputStream(headerString);
|
||||
StringBuilder builder = new StringBuilder(128);
|
||||
Map<String, List<String>> headers = I2PTunnelHTTPServer.readHeaders(in, builder, new String[0], I2PAppContext.getGlobalContext());
|
||||
Map<String, List<String>> headers = I2PTunnelHTTPServer.readHeaders(null, in, builder, new String[0], I2PAppContext.getGlobalContext());
|
||||
String result = I2PTunnelHTTPServer.formatHeaders(headers, builder);
|
||||
int first = result.indexOf("abc");
|
||||
assertTrue(first >= 0);
|
||||
|
@@ -10,6 +10,7 @@ import java.io.OutputStreamWriter;
|
||||
import java.io.Writer;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.text.DateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
@@ -18,6 +19,7 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import net.i2p.crypto.SU3File;
|
||||
import net.i2p.crypto.TrustedUpdate;
|
||||
@@ -553,11 +555,19 @@ class NewsFetcher extends UpdateRunner {
|
||||
out.write("-->\n");
|
||||
if (entries == null)
|
||||
return;
|
||||
DateFormat fmt = DateFormat.getDateInstance(DateFormat.SHORT);
|
||||
// the router sets the JVM time zone to UTC but saves the original here so we can get it
|
||||
String systemTimeZone = _context.getProperty("i2p.systemTimeZone");
|
||||
if (systemTimeZone != null)
|
||||
fmt.setTimeZone(TimeZone.getTimeZone(systemTimeZone));
|
||||
for (NewsEntry e : entries) {
|
||||
if (e.title == null || e.content == null)
|
||||
continue;
|
||||
out.write("<!-- Entry Date: " + (new Date(e.updated)) + " -->\n");
|
||||
Date date = new Date(e.updated);
|
||||
out.write("<!-- Entry Date: " + date + " -->\n");
|
||||
out.write("<h3>");
|
||||
out.write(fmt.format(date));
|
||||
out.write(": ");
|
||||
out.write(e.title);
|
||||
out.write("</h3>\n");
|
||||
out.write(e.content);
|
||||
|
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: I2P routerconsole\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-10-14 13:33+0000\n"
|
||||
"POT-Creation-Date: 2015-07-17 01:33+0000\n"
|
||||
"PO-Revision-Date: 2010-06-15 14:09+0100\n"
|
||||
"Last-Translator: duck <duck@mail.i2p>\n"
|
||||
"Language-Team: duck <duck@mail.i2p>\n"
|
||||
@@ -51,6 +51,9 @@ msgstr ""
|
||||
msgid "Angola"
|
||||
msgstr ""
|
||||
|
||||
msgid "Asia/Pacific Region"
|
||||
msgstr ""
|
||||
|
||||
msgid "Antarctica"
|
||||
msgstr ""
|
||||
|
||||
@@ -102,6 +105,9 @@ msgstr ""
|
||||
msgid "Benin"
|
||||
msgstr ""
|
||||
|
||||
msgid "Saint Barthélemy"
|
||||
msgstr ""
|
||||
|
||||
msgid "Bermuda"
|
||||
msgstr ""
|
||||
|
||||
@@ -111,6 +117,9 @@ msgstr ""
|
||||
msgid "Bolivia"
|
||||
msgstr ""
|
||||
|
||||
msgid "Bonaire"
|
||||
msgstr ""
|
||||
|
||||
msgid "Brazil"
|
||||
msgstr ""
|
||||
|
||||
@@ -138,15 +147,12 @@ msgstr ""
|
||||
msgid "Cocos (Keeling) Islands"
|
||||
msgstr ""
|
||||
|
||||
msgid "The Democratic Republic of the Congo"
|
||||
msgid "Congo"
|
||||
msgstr ""
|
||||
|
||||
msgid "Central African Republic"
|
||||
msgstr ""
|
||||
|
||||
msgid "Congo"
|
||||
msgstr ""
|
||||
|
||||
msgid "Switzerland"
|
||||
msgstr ""
|
||||
|
||||
@@ -243,7 +249,7 @@ msgstr ""
|
||||
msgid "Falkland Islands (Malvinas)"
|
||||
msgstr ""
|
||||
|
||||
msgid "Federated States of Micronesia"
|
||||
msgid "Micronesia"
|
||||
msgstr ""
|
||||
|
||||
msgid "Faroe Islands"
|
||||
@@ -345,7 +351,7 @@ msgstr ""
|
||||
msgid "Iraq"
|
||||
msgstr ""
|
||||
|
||||
msgid "Islamic Republic of Iran"
|
||||
msgid "Iran"
|
||||
msgstr ""
|
||||
|
||||
msgid "Iceland"
|
||||
@@ -384,7 +390,7 @@ msgstr ""
|
||||
msgid "Saint Kitts and Nevis"
|
||||
msgstr ""
|
||||
|
||||
msgid "The Democratic People's Republic of Korea"
|
||||
msgid "North Korea"
|
||||
msgstr ""
|
||||
|
||||
msgid "Republic of Korea"
|
||||
@@ -429,7 +435,7 @@ msgstr ""
|
||||
msgid "Latvia"
|
||||
msgstr ""
|
||||
|
||||
msgid "Libyan Arab Jamahiriya"
|
||||
msgid "Libya"
|
||||
msgstr ""
|
||||
|
||||
msgid "Morocco"
|
||||
@@ -438,7 +444,7 @@ msgstr ""
|
||||
msgid "Monaco"
|
||||
msgstr ""
|
||||
|
||||
msgid "Republic of Moldova"
|
||||
msgid "Moldova"
|
||||
msgstr ""
|
||||
|
||||
msgid "Montenegro"
|
||||
@@ -453,7 +459,7 @@ msgstr ""
|
||||
msgid "Marshall Islands"
|
||||
msgstr ""
|
||||
|
||||
msgid "The Former Yugoslav Republic of Macedonia"
|
||||
msgid "Macedonia"
|
||||
msgstr ""
|
||||
|
||||
msgid "Mali"
|
||||
@@ -465,7 +471,7 @@ msgstr ""
|
||||
msgid "Mongolia"
|
||||
msgstr ""
|
||||
|
||||
msgid "Macao"
|
||||
msgid "Macau"
|
||||
msgstr ""
|
||||
|
||||
msgid "Northern Mariana Islands"
|
||||
@@ -645,13 +651,19 @@ msgstr ""
|
||||
msgid "Suriname"
|
||||
msgstr ""
|
||||
|
||||
msgid "South Sudan"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sao Tome and Principe"
|
||||
msgstr ""
|
||||
|
||||
msgid "El Salvador"
|
||||
msgstr ""
|
||||
|
||||
msgid "Syrian Arab Republic"
|
||||
msgid "Sint Maarten"
|
||||
msgstr ""
|
||||
|
||||
msgid "Syria"
|
||||
msgstr ""
|
||||
|
||||
msgid "Swaziland"
|
||||
@@ -702,7 +714,7 @@ msgstr ""
|
||||
msgid "Taiwan"
|
||||
msgstr ""
|
||||
|
||||
msgid "United Republic of Tanzania"
|
||||
msgid "Tanzania"
|
||||
msgstr ""
|
||||
|
||||
msgid "Ukraine"
|
||||
@@ -723,7 +735,7 @@ msgstr ""
|
||||
msgid "Uzbekistan"
|
||||
msgstr ""
|
||||
|
||||
msgid "Holy See (Vatican City State)"
|
||||
msgid "Vatican"
|
||||
msgstr ""
|
||||
|
||||
msgid "Saint Vincent and the Grenadines"
|
||||
@@ -735,7 +747,7 @@ msgstr ""
|
||||
msgid "Virgin Islands"
|
||||
msgstr ""
|
||||
|
||||
msgid "Viet Nam"
|
||||
msgid "Vietnam"
|
||||
msgstr ""
|
||||
|
||||
msgid "Vanuatu"
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: I2P susidns\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-05-14 08:33+0000\n"
|
||||
"POT-Creation-Date: 2015-07-17 01:33+0000\n"
|
||||
"PO-Revision-Date: 2010-06-15 14:09+0100\n"
|
||||
"Last-Translator: duck <duck@mail.i2p>\n"
|
||||
"Language-Team: duck <duck@mail.i2p>\n"
|
||||
@@ -222,7 +222,7 @@ msgstr ""
|
||||
#: ../src/java/src/i2p/susi/dns/AddressbookBean.java:326
|
||||
#: ../src/java/src/i2p/susi/dns/ConfigBean.java:108
|
||||
#: ../src/java/src/i2p/susi/dns/NamingServiceBean.java:316
|
||||
#: ../src/java/src/i2p/susi/dns/SubscriptionsBean.java:153
|
||||
#: ../src/java/src/i2p/susi/dns/SubscriptionsBean.java:157
|
||||
msgid ""
|
||||
"Invalid form submission, probably because you used the \"back\" or \"reload"
|
||||
"\" button on your browser. Please resubmit."
|
||||
@@ -231,14 +231,14 @@ msgstr ""
|
||||
#: ../src/java/src/i2p/susi/dns/AddressbookBean.java:328
|
||||
#: ../src/java/src/i2p/susi/dns/ConfigBean.java:110
|
||||
#: ../src/java/src/i2p/susi/dns/NamingServiceBean.java:318
|
||||
#: ../src/java/src/i2p/susi/dns/SubscriptionsBean.java:155
|
||||
#: ../src/java/src/i2p/susi/dns/SubscriptionsBean.java:159
|
||||
msgid ""
|
||||
"If the problem persists, verify that you have cookies enabled in your "
|
||||
"browser."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/java/src/i2p/susi/dns/ConfigBean.java:99
|
||||
#: ../src/java/src/i2p/susi/dns/SubscriptionsBean.java:128
|
||||
#: ../src/java/src/i2p/susi/dns/SubscriptionsBean.java:131
|
||||
#: ../src/tmp/i2p/susi/dns/jsp/config_jsp.java:160
|
||||
#: ../src/tmp/i2p/susi/dns/jsp/subscriptions_jsp.java:151
|
||||
msgid "Save"
|
||||
@@ -249,7 +249,7 @@ msgid "Configuration saved."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/java/src/i2p/susi/dns/ConfigBean.java:102
|
||||
#: ../src/java/src/i2p/susi/dns/SubscriptionsBean.java:147
|
||||
#: ../src/java/src/i2p/susi/dns/SubscriptionsBean.java:151
|
||||
#: ../src/tmp/i2p/susi/dns/jsp/config_jsp.java:158
|
||||
#: ../src/tmp/i2p/susi/dns/jsp/subscriptions_jsp.java:149
|
||||
msgid "Reload"
|
||||
@@ -278,16 +278,16 @@ msgstr ""
|
||||
msgid "Failed to delete Destination for {0} from naming service {1}"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/java/src/i2p/susi/dns/SubscriptionsBean.java:140
|
||||
#: ../src/java/src/i2p/susi/dns/SubscriptionsBean.java:144
|
||||
msgid ""
|
||||
"Subscriptions saved, updating addressbook from subscription sources now."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/java/src/i2p/susi/dns/SubscriptionsBean.java:145
|
||||
#: ../src/java/src/i2p/susi/dns/SubscriptionsBean.java:149
|
||||
msgid "Subscriptions saved."
|
||||
msgstr ""
|
||||
|
||||
#: ../src/java/src/i2p/susi/dns/SubscriptionsBean.java:149
|
||||
#: ../src/java/src/i2p/susi/dns/SubscriptionsBean.java:153
|
||||
msgid "Subscriptions reloaded."
|
||||
msgstr ""
|
||||
|
||||
|
Reference in New Issue
Block a user