3
16
Fork
You've already forked lichen
1

#2 Use query strings over direct paths for all file server queries #31

Merged
stringbone merged 15 commits from 2/remove-filepath-trail into master 2024年01月27日 00:10:40 +01:00

Currently, when Lichen does a thing, like edit.cgi, it queries the file to edit like the following: edit.cgi/index.gmi. This can be gotten from the env variable PATH_INFO. This works well, but causes issues when you want to do any relative file importing, e.g. JS imports.

This PR moves to using query strings instead of the direct path, e.g. edit.cgi?/index.cgi. This allows us to use the QUERY_STRING env variable, which is also super standard and simple, and makes it possible to import files in the JS.

The importing is important so we can increase our test coverage of our basic utilities and further extract utilities to simplify maintenance and have more confidence going forward in bugfixes and improvements.

Currently, when Lichen does a thing, like `edit.cgi`, it queries the file to edit like the following: `edit.cgi/index.gmi`. This can be gotten from the env variable `PATH_INFO`. This works well, but causes issues when you want to do any relative file importing, e.g. [JS imports](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import). This PR moves to using query strings instead of the direct path, e.g. `edit.cgi?/index.cgi`. This allows us to use the `QUERY_STRING` env variable, which is also super standard and simple, and makes it possible to import files in the JS. The importing is important so we can increase our test coverage of our basic utilities and further extract utilities to simplify maintenance and have more confidence going forward in bugfixes and improvements.
stringbone force-pushed 2/remove-filepath-trail from 0e495ee791 to 410f4e02ae 2024年01月27日 00:07:40 +01:00 Compare
stringbone force-pushed 2/remove-filepath-trail from 410f4e02ae to ebd7fdafd4 2024年01月27日 00:08:40 +01:00 Compare
stringbone deleted branch 2/remove-filepath-trail 2024年01月27日 00:10:41 +01:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
stringbone/lichen!31
Reference in a new issue
stringbone/lichen
No description provided.
Delete branch "2/remove-filepath-trail"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?