Thoughts

mental health break ,./'"**^^$_---
I think what I want is CGI. I think my problem is when you start semantically defining whether a file should be executed or echoed based on
its place in the file system. But there's no way around that, since the location in the file system is the only thing that defines files. Or I guess it would be super nice if there a was web-server that was optimized for serving static content that also supported arbitrary scripting. For example, this is ugly in my opinion (pseudocode): ``` <Directory /static> ServeAsStatic </Directory> <Directory /cgi> CGIExecute </Directory> ``` But this is nice: ``` <Match /static> ServeAsStatic /static </Match> <Match /cgi> #!/usr/bin/python3 import os os.stdin.read.parse_as_cgi() ... </Match> ``` Like Apache wants to establish the mapping between the request URL and the file system first, then decide if the file should be served as static or executed. I think the request URL should be parsed to decide if it's serving a static file or a cgi file, then allow each path to define its own logic for how to handle the request. (In the static case, that means mapping the request to the file system. In the dynamic case, that also means mapping the request to the file system (the file with the code in it), but I wish it didn't.)
Link 9:48 p.m. Jan 17, 2023 UTC-5