WIP: Connect to unix sockets to interface with user-written programs. #11
Loading…
Reference in New Issue
No description provided.
Delete Branch "qcna/vger:master"
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?
This patch fixes the potentially unwanted behavior of responding to unix socket requests like a file just vanished half-way through the request.
Additionally, it introduces the ability to connect to said sockets and stream data from them to the requester, through gemini. This is useful because it makes an extremely easy way for tilde members to programmatically create responses without having to deal with CGI. They can just create a program that listens on a socket inside the server root.
For example: (nmap-style ncat)
Now, a user requesting
date.gmi
with a gemini client will get the following text/gemini response:Fri Mar 10 06:29:14 PM CET 2023
Please note that I am not very experienced with C. I was quite careful while writing it, but there is a decent chance I made some big mistake somewhere. A thorough review would be most appreciated :)
Step 1:
From your project repository, check out a new branch and test the changes.Step 2:
Merge the changes and update on Gitea.