convert from uri to path and not path to path - tttml - converters for a simple… | |
git clone git://bitreich.org/tttml git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 332be10e3e3139840a4f021f6f6108fcfb32d064 | |
parent bd5225db743ed20a10451c667dcd8de42c6e1437 | |
Author: Josuah Demangeon <[email protected]> | |
Date: Fri, 20 Apr 2018 14:42:16 +0200 | |
convert from uri to path and not path to path | |
Diffstat: | |
M markup-gopher | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/markup-gopher b/markup-gopher | |
@@ -27,11 +27,11 @@ match($0, "^\\[[^]]*\\]: ") { | |
port = PORT; tag = substr($0, 2, RLENGTH - 4); | |
path = uri; type = "0"; | |
- sub("^[ \t]*", "", path); | |
+ sub("^[ \t]*", "", uri); | |
if (match(uri, "^[01789aghI]/")) { | |
path = uri; sub(".", "", path); | |
- type = substr(path, 1, 1); | |
+ type = substr(uri, 1, 1); | |
} else if (sub("^gopher://", "", uri)) { | |
path = uri; sub(".*/", "/", path); | |
host = uri; sub("/.*", "", host); |