Fossil

Timeline
Login

Timeline

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

About branch cgi-compliance

Research on the meaning of the REQUEST_URI environment variable suggests that I've been doing it wrong for a long time. Findings:

  1. REQUEST_URI is not part of rfc3875. So it isn't an official CGI variable. Hence its meaning is not well-defined.

  2. Apache and Nginx set REQUEST_URI to be the second field of the HTTP request. That means that REQUEST_URI includes the query string.

  3. Althttpd and Wapp omit the query string from REQUEST_URI.

  4. Fossil doesn't really care that much. Fossil wants to use SCRIPT_NAME and PATH_INFO. Fossil mostly only uses REQUEST_URI when one or the other of those two are unavailable.

We need to bring Fossil into agreement with Apache and Nginx. That is what this branch is about. Althttpd and Wapp also need to be brought into conformance.

5 check-ins related to "cgi-compliance"
2022-02-13
19:16
Back out check-in [5bb921dd0893a548] which was wrong - the REQUEST_URI CGI parameter should include the query string. Improve the CGI variable documentation in comments. Improve robustness to malformed CGI variables. ... (check-in: e514eeea user: drh tags: trunk)
19:14
Improved robustness in CGI variable parsing. ... (Closed-Leaf check-in: b8973500 user: drh tags: cgi-compliance)
01:35
Cherry-pick from branch 'cgi-compliance' (and thus back out [5bb921dd0893a548]). Adapt the computation of g.zUrlSuffix in set_base_url() accordingly. ... (check-in: 5c649c7e user: george tags: base-href-fix)
00:26
Back out [5bb921dd0893a548]. It turns out that REQUEST_URI should have the query string appended. Make other changes to cgi.c to bring it into "compliance". "Compliance" is in quotes because rfc3875 does not define REQUEST_URI. That variable is really just by conveniention. But Apache and Nginx both append the query string, so we should too. ... (check-in: fd1c9b09 user: drh tags: cgi-compliance)
2022-02-12
20:53
Update the defense-against-robots documentation to align with current behavior. ... (check-in: c9082b29 user: drh tags: trunk)