killiankemps / marmotte Goto Github PK
View Code? Open in Web Editor NEWSimple, efficient gopher client in Rust
License: CeCILL Free Software License Agreement v2.1
Simple, efficient gopher client in Rust
License: CeCILL Free Software License Agreement v2.1
Marmotte panicks with this error when accessing a bogus menu:
thread 'main' panicked at 'byte index 1 is out of bounds of ``', src/libcore/str/mod.rs:2051:9
URL of bogus Menu: gopher://khzae.net:70/1/s1000d
The bogus menu has a line without an item type.
On vf-1 I see this line is not displayed at all.
Part of the page retrieved by curl:
$ curl gopher://khzae.net:70/1/s1000d
iTools and other resources for the Specification 1000D error.host 1
i error.host 1
''. .... 70
i ..,'',:,;.'''. .'. .'..',cc;;,;,''.. error.host 1
i cllll:c:. .,,;c:,c,:cllllllllc; error.host 1
i 'c.. .clllllllc;l:;..;lc';lc,. error.host 1
[…]
We should avoid to have a panic error and maybe try to fallback like vf-1 by ignoring bogus lines.
Go to gopher://zaibatsu.circumlunar.space:70/1/updates/
Then open first entry 1
called "Release Retrospective"
Error: thread 'main' panicked at 'index out of bounds: the len is 3 but the index is 3', /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libcore/slice/mod.rs:2717:10
A curl gopher://circumlunar.space:70/1/~sloum/phlog
shows that the first entry begins with a 1
so it is normal to be interpreted as a menu entry:
curl gopher://circumlunar.space:70/1/~sloum/phlog
i . . . - , - , . false null.host 1
i + * _________ . . false null.host 1
i. * , + / \ + false null.host 1
i . - . / // \ * . false null.host 1
i , . | + ' | | . false null.host 1
i --+-- s l o u m | || | + false null.host 1
i | * | * ' * \\\___ /\/ . ' false null.host 1
i-+- ____ . . \/ \ / \ __ false null.host 1
i |_/ \___ _ + . /\/\/\\/ : \/ \ false null.host 1
i/\\\\o |\l \___/|\ + _/ -- |/\: ../ ... false null.host 1
i|////o \\\ L \____/ __ _ _ ___:_ __ false null.host 1
i _____________ false null.host 1
i |\ phlog. \ false null.host 1
i______________|_\============\_______________ false null.host 1
i false null.host 1
1191209-19 - Release Retrospective /~sloum/phlog/20191209-19.txt circumlunar.space 70
0191107-22 - Go On Gopher /~sloum/phlog/20191107-22.txt circumlunar.space 70
0191018-16 - Jaffar /~sloum/phlog/20191018-16.txt circumlunar.space 70
0191005-22 - Bombadillo updates /~sloum/phlog/20191005-22.txt circumlunar.space 70
0190719-19 - This and that /~sloum/phlog/20190719-19.txt circumlunar.space 70
0190609-16 - Orion /~sloum/phlog/20190609-16.txt circumlunar.space 70
[…]
However, another Gopher client like VF-1 displays the first item as a text entry when the resource is requested.
It seems the bug is more on the gopherhole side. However, VF-1 manages it in a way to display the menu as a text entry.
Should marmotte fail gracefully like VF-1 into text mode if the menu doesn't display correctly or should marmotte display an error about the requested page without panicking?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.