~dancek

Trackers

~dancek/twinwiki

Last active 1 year, 11 months ago

~dancek/vimini

Last active 2 years ago

#2 Trailing "/" causes instance to return front page 1 year, 11 months ago

Comment by ~dancek on ~dancek/twinwiki

This is somewhat intentional. The URL with and without a trailing slash are two different URLs even if some people on the modern web think otherwise. For now, the version with trailing slash does not have any defined behavior (but it could) and so it's redirected to the root page by the default URL handler.

It's trivial to "fix", but I don't like URL redirects where they're not needed. Ie. I'm not planning to change it.

On the other hand if you care enough to fix it and set up your own instance, I'll accept the patch. I'd even be happy to let you (or someone else) maintain the codebase. I'm not really planning to work on it myself.

#1 Possible to handle line turn char ? 2 years ago

Comment by ~dancek on ~dancek/twinwiki

This is an interesting idea! I actually went and wrote a unit test for that, expecting to implement it after the test fails. But the test passed; the implementation already supports newlines in commands.

I tried editing the vimwiki test instance using amfora. As you said, typing \n in the input does not result in a newline. But then that's quite obvious, because the input doesn't support escaping. Rather its text is URL encoded as is, and so \ becomes %5C and thus \n is encoded %5Cn.

Now, of course the newline can be url encoded too. It is %0A. So running the command

gemget -o- 'gemini://hannuhartikainen.fi/twinwiki/test/_edit?cLorem%20ipsum%0Adolor%20sit%0Aamet'

results in the document content becoming

Lorem ipsum
dolor sit
amet

as expected.

Of course, clients with any kind of an UI will probably not support this. But they could.

Does this help?

#2 URL query should be replaced, not appended 2 years ago

Ticket created by ~dancek on ~dancek/vimini

If a request already has a query like /foo?bar and the server responds with status 10, the next response should be /foo?baz but is actually /foo?bar?baz.