This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
The following commit(s) were added to refs/heads/master by this push:
new 05070b9 Typo: resoruce => resource
05070b9 is described below
commit 05070b9b21adbe733de16107fb444bdc94aa2f44
Author: Sebb <[email protected]>
AuthorDate: Mon Nov 1 00:17:10 2021 +0000
Typo: resoruce => resource
---
server/_server.py | 54 +++++++++++++++++++++++++++++++++
webui/js/ponymail.js | 2 +-
webui/js/source/base-http-extensions.js | 2 +-
3 files changed, 56 insertions(+), 2 deletions(-)
diff --git a/server/_server.py b/server/_server.py
new file mode 100644
index 0000000..6d4dc06
--- /dev/null
+++ b/server/_server.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python3
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import http.server
+import json
+
+class Handler(http.server.BaseHTTPRequestHandler):
+ def do_GET(self):
+ print(self)
+ self.send_response(405)
+ self.end_headers()
+
+ def do_POST(self):
+ print(self.path)
+ print(self.headers)
+ print("++++++++")
+ print(self.rfile.read1())
+ print("--------")
+ self.send_response(200)
+ self.end_headers()
+ ret = {
+ "hits" : {
+ "total" : 0,
+ "hits" : [ ]
+ },
+ "aggregations" : {
+ "listnames" : {
+ "buckets" : []
+ }
+ }
+ }
+
+ self.wfile.write(json.dumps(ret).encode('utf-8'))
+
+# Bind to the local address only.
+server_address = ('127.0.0.1', 9200)
+httpd = http.server.HTTPServer(server_address, Handler)
+httpd.serve_forever()
+
diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js
index 1ffc967..21413d2 100644
--- a/webui/js/ponymail.js
+++ b/webui/js/ponymail.js
@@ -73,7 +73,7 @@ async function async_snap(error) {
msg = await error.text();
msg = msg.replace(/<.*?>/g, ""); // strip HTML tags
if (error.status === 404) {
- msg += "\n\nYou may need to be logged in with additional permissions
in order to view this resoruce.";
+ msg += "\n\nYou may need to be logged in with additional permissions
in order to view this resource.";
}
modal("An error occured", "An error code %u occured while trying to fetch
%s:\n%s".format(error.status, error.url, msg), "error");
}
diff --git a/webui/js/source/base-http-extensions.js
b/webui/js/source/base-http-extensions.js
index 8691207..17a92aa 100644
--- a/webui/js/source/base-http-extensions.js
+++ b/webui/js/source/base-http-extensions.js
@@ -67,7 +67,7 @@ async function async_snap(error) {
msg = await error.text();
msg = msg.replace(/<.*?>/g, ""); // strip HTML tags
if (error.status === 404) {
- msg += "\n\nYou may need to be logged in with additional permissions
in order to view this resoruce.";
+ msg += "\n\nYou may need to be logged in with additional permissions
in order to view this resource.";
}
modal("An error occured", "An error code %u occured while trying to fetch
%s:\n%s".format(error.status, error.url, msg), "error");
}