youtube/gopher: use PATH_TRANSLATED, fallback to PATH_INFO - frontends - front-ends for some sites (experiment)
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit dfe9d705355efc8d67dfb40f015f503bc5a089bf
 (DIR) parent b608dae128234bedd5ed09fe89c22c0dd5ef0b28
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Fri, 13 Jun 2025 17:17:01 +0200
       
       youtube/gopher: use PATH_TRANSLATED, fallback to PATH_INFO
       
       This change is needed for the latest geomyidae which more strictly conforms to
       the CGI RFC.
       
       Diffstat:
         M youtube/gopher.c                    |       4 +++-
       
       1 file changed, 3 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/youtube/gopher.c b/youtube/gopher.c
       @@ -282,7 +282,9 @@ main(void)
                        host = p;
                if ((p = getenv("SERVER_PORT")))
                        port = p;
       -        if ((p = getenv("PATH_INFO")))
       +        if ((p = getenv("PATH_TRANSLATED")))
       +                requestpath = p;
       +        else if ((p = getenv("PATH_INFO"))) /* fallback to PATH_INFO */
                        requestpath = p;
                if ((p = getenv("QUERY_STRING")))
                        querystring = p;