Question marks (?) in .meta directives #228
wanderer1988
started this conversation in
Ideas
Replies: 1 comment
-
Please note that as specified in the README.md file, the part before the colon is a file path and not a match of the URL.
This is so that agate does not have to do complex pattern matching when handling a request. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I currently experiment a little bit with the .meta files and found a (maybe silly, maybe useful, anyway interesting) use case which currently doesn't seem to work:
For a specific path I want to require an input via the get property. So I thought about returning a status code 10 (input required) if no input is given yet, and a 30 (redirect to a confirmation page) if an input is given via the URL. Since the delimiter of an input is a question mark, I thought about doing it with a wildcard, this way:
.well-known/mention: 10 Please give input
.well-known/mention?*: 30 confirm.gmi
The first directive works, I get an input prompt. The second one, the redirect, however doesn't seem to work. I get an input prompt again and again. Is there a way that the redirect could work this way or similar, or doesn't it work at all?
To clarify what I want to do here at all: I came across this concept of gemlog mentions: gemini://gmi.bacardi55.io/gemlog/2022/02/27/my-take-on-gemlog-replies/. This concept requires to have an endpoint at
.well-known/mention
which takes an argument that is usually processed in a CGI script. Since agate doesn't support CGI and I don't bother learning it either I had the idea of some kind of dumb "pseudo-CGI", where the relevant information is just added to the agate log and a separate script looks up the log for updates from this specific location on a regular basis.Beta Was this translation helpful? Give feedback.
All reactions