diff options
author | Omar Polo <op@omarpolo.com> | 2022-11-27 15:35:10 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2022-11-27 15:35:10 +0000 |
commit | 97b306cbee6d105885a761e04274f661a0ec3757 (patch) | |
tree | e28086c92735e049e79d9613ecdec7da536d5f48 /iri.c | |
parent | 77718c121f89b39bd0095f10e2dbd2ff9df65281 (diff) |
add an implicit fastcgi parameter: GEMINI_SEARCH_STRING
it’s the QUERY_STRING decoded if it’s a search-string (i.e. not a
key-value pair.) It’s useful for scripts to avoid percent-decoding
the querystring in the most common case of a query, because in Gemini
querystrings key-value paired are not common.
Idea from a discussion with Allen Sobot.
Diffstat (limited to 'iri.c')
-rw-r--r-- | iri.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -488,7 +488,9 @@ pct_decode_str(char *s) char *t; for (t = s; *t; ++t) { - if (*t == '%' && valid_pct_enc_string(t)) + if (*t == '+') + *t = ' '; + else if (*t == '%' && valid_pct_enc_string(t)) pct_decode(t); } |