commit 67528c1f82bed7d6626c3be7a68d3cd98b4944f5 from: Omar Polo date: Mon Feb 01 12:28:30 2021 UTC don't add the query to argv FRC3875 says that if the query does not contain any unecnoded "=" characters, we SHOULD treat the query string as a "search-string", split in on "+" and add every word to the CGI argv. In launch_cgi it's too late because iri->query is the *decoded* query! I have in mind some refactoring around how we decode things, so this is postponed. commit - 2fafa2d23e5607def335902b7a9d10a9de5247a9 commit + 67528c1f82bed7d6626c3be7a68d3cd98b4944f5 blob - 2e8e76539818c835a64fe785bb7ff189514df722 blob + fbed2fe6ab519a1f5d14ca79acce74a01096e457 --- ex.c +++ ex.c @@ -246,7 +246,7 @@ launch_cgi(struct iri *iri, const char *spath, char *r return -1; case 0: { /* child */ - char *argv[] = {NULL, NULL, NULL}; + char *argv[] = {NULL, NULL}; char *ex, *pwd; char iribuf[GEMINI_URL_LEN]; char path[PATH_MAX]; @@ -257,7 +257,6 @@ launch_cgi(struct iri *iri, const char *spath, char *r ex = xasprintf("%s/%s", vhost->dir, spath); argv[0] = ex; - argv[1] = iri->query; serialize_iri(iri, iribuf, sizeof(iribuf));