aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-05-09 09:45:39 +0000
committerFuwn <[email protected]>2022-05-09 09:45:39 +0000
commitbe1612801a46fd19a10034f3fdcda5d731b0587c (patch)
tree566d104c504390f8ed39eb59dea36151d54873b4
parentrefactor(maple): move ssl work to function (diff)
parentfix(build): c++20 instead of c++23 wd (diff)
downloadmaple-be1612801a46fd19a10034f3fdcda5d731b0587c.tar.xz
maple-be1612801a46fd19a10034f3fdcda5d731b0587c.zip
Merge branch 'main' of https://github.com/gemrest/maple
-rw-r--r--README.md14
-rwxr-xr-x[-rw-r--r--]bin/genkey0
-rw-r--r--maple/maple.cc8
3 files changed, 17 insertions, 5 deletions
diff --git a/README.md b/README.md
index fbfd0bd..8bbfeb9 100644
--- a/README.md
+++ b/README.md
@@ -76,6 +76,20 @@ field which should be modified is the `ports`, if you have to.
2. Run: `out/maple`, or
`TITAN=1 TITAN_TOKEN=secret TITAN_MAX_SIZE=2048 out/maple`
+### Hacking
+
+If you decide to tamper with Maple, you should give your commits a test. As
+there isn't a test suite yet, feel free to use any of these examples:
+
+```bash
+# Using OpenSSL directly to debug different requests:
+$ openssl s_client -ign_eof -quiet -connect localhost:1965 <<< \
+> "gemini://localhost:1965"
+
+# Using Bollux to debug proper requests... or any client!
+$ bollux localhost
+```
+
## Capsules using Maple
[Add yours!](https://github.com/gemrest/maple/edit/main/README.md)
diff --git a/bin/genkey b/bin/genkey
index e081711..e081711 100644..100755
--- a/bin/genkey
+++ b/bin/genkey
diff --git a/maple/maple.cc b/maple/maple.cc
index c76118a..ed434ab 100644
--- a/maple/maple.cc
+++ b/maple/maple.cc
@@ -56,16 +56,14 @@ auto main() -> int {
std::string file_extension = entry.path().string().substr(
entry.path().string().find_last_of('.') + 1
);
- std::string gemini_file_extension = "gmi";
// Only keep track of file if it is a Gemini file
if (std::equal(
file_extension.begin(),
file_extension.end(),
- gemini_file_extension.begin(),
- gemini_file_extension.end(),
- [](auto a, auto b) -> bool {return std::tolower(a) == std::tolower(b);
- }
+ std::string("gmi").begin(),
+ std::string("gmi").end(),
+ [](char a, char b) -> bool { return std::tolower(a) == std::tolower(b); }
)) {
gemini_files.push_back(entry.path());
}